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:
Then, every frame, I would take the bone's world transform and multiply that by ToBoneFromObject:
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?
asked Jul 24 '15 at 03:24 AM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here