Sorry, this is a duplicate of a thread I made elsewhere, but I haven’t found an adequate solution to my problem. Not sure if it’s a bug or if I am just not understanding how to accomplish something.
Hiya,
I have not found a good solution to this problem. I have found a solution that “works”, but it is ugly. What I ended up doing is making a function that essentially calls SetActorLocation/SetActorRotation to an owning actor’s carry joint, and then calling that function in a ton of places. I call it from the carried player’s tick, from the carrying player’s tick, and from the carrying player’s “PostNetReceiveLocationAndRotation”. Then I also set it to be at that position during some animations.
It’s not a great solution, but it’s the only solution I could get that didn’t look terrible.
I do it all in Code unfortunately I don’t know that you’ll be able to access all the locations that I update things in blueprint
Sadly I also can’t share the code as I don’t have any seniority at my job at all. I wish I could be more help
I can try to give you a better summary than the previous one though.
So my carrying player has a joint/socket in his skeleton. I just have the name of that joint accessible through a constant in my code. In my overridden versions of the functions I mentioned before.
The function I made to move the actor to that joint essentially does this.
Get the offset from the root bone of the carried actor, which is essentially -1.0f * GetMesh()->GetRelativeTransform().GetLocation();
Get the rotation of the target transform of the carrying bone.
Rotate the offset value from #1.
Apply the offset to the target rotation.
Move the actor to the target position and target rotation.