Modular pawn skeleton components out of position
I am creating a modular pawn by adding 2 meshes with same skeleton together using a ACharacter class in C++.
I use the following code :
however when the player spawns the Head is way far in the air from the rest of the body, however the animations runs correctly (With head still in air) and it also follows the parent mesh's rotation
Although adding components in persona animation viewer works correctly
LOL I'm stupid! All I had to do was set the child skeletal mesh component position to that of parent mesh component.
By default the Engine creates each new component at world origin and then the actor keeps that as the relative position
In short I had to add the following line
where GetMesh() gives the default/parent Mesh component in a ACharacter class!
Hope this will help future new comers
Thanks for the info! Just to clarify does this allow you to swap out the "head and arms" of you character? I am wanting to implement an armor system where people can equip helmets and chest armor. Just wondering if this is the way to do it. Thanks!
answered Mar 10 '15 at 05:18 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here