x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Attach object to PoseableMesh bone in blueprint

I am currently trying to write a blueprint script that mimics attaching an object to a bone, without attaching it in the editor. (I'm using a PoseableMesh which, for whatever reason, doesn't update its bone transforms when you attach an object to it. So I have to do it manually.) I want to start with the location and rotation of the object relative to the bone when the game first loads, then always move it relative to the bone by those values.

The thing is, I know how I would do this with regular transformation matrices. At the game start I would take the bone's world transform (ToWorldFromBone), invert it (ToBoneFromWorld), then multiply that by the object's transform:

 ToBoneFromWorld * ToWorldFromObject = ToBoneFromObject

Then, every frame, I would take the bone's world transform and multiply that by ToBoneFromObject:

 ToWorldFromBone * ToBoneFromObject = ToWorldFromObject

And then set ToWorldFromObject as the object's transform. However, Unreal appears to be missing a very crucial step in the beginning, the ability to invert a transform like you would a matrix.

I see ConvertTransfromToRelative, InverseTransformDirection, and InverseTransformLocation, but either they aren't what I want or I don't understand their purpose. I attached some screenshots of how I would make these blueprints, with my made up InvertTransform node included. How should I go about this?

alt text

alt text

Product Version: UE 4.7
Tags:
q_beginplay.png (162.0 kB)
q_tick.png (183.7 kB)
more ▼

asked Jul 24 '15 at 03:24 AM in Blueprint Scripting

avatar image

jasonericson
1 1 1

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question