AttachToComponent position is miles away

Hi all,

Im following what I consider the most simple of tasks - attach some random actor to a given character.
My task is set out in the level blueprint and simply invokes the attach to component at the end of an animation.

It seems whether I use ‘attach actor to component’ or the simple ‘attach to’, either will give the same result - the position of the object does not change relative to the new parent - no matter what ‘attach type’ I set.

So if my object is located at (50,50,50), once it attaches it’s transform stays at that distance from it’s new parent.
I thought the idea was that the object should relatively alter it’s transform, so I can keep the world transform and it translates on the fly to be relative to its new parent?

I also added in a DoOnce loop just after matinee finished node, to ensure it only does it once…but I get the same result.

What am I not doing ?

  • bumping *

Edit: My tinDebree object is a normal static mesh within a blueprint, the actual mesh part switched to movable. I know there is the video tutorials to attach a weapon etc, but should I be using something else?

75988-hierarchy.jpg

I have tried something similar to this: How do I attach an Actor Blueprint to a socket in a Character Blueprint? - Programming & Scripting - Epic Developer Community Forums

If I drag a random mesh onto the scene…it works that way. I simply want to attach a blueprint actor to any other actor. In unity3D, this is as easy as setting the transform parent.

Im really completely stumped on this…help…

For anyone reading this, with a little experimenting, it seems the answer lies around the fact I am triggering this after animating the object I want to attach. It seems the animation is still playing or holding onto the transform of the object, thus sending it miles away.

My next step was to try and hide the object after animating, then spawn a brand new tinDebree Blueprint actor in the same position as the one I animated, then attach the newly spawned object…but then it refuses to add the spawned object to my character mesh.

So my solution which is completely un-ideal is to add the mesh to the character and switch it on when I need it until someone can point me in the right direction.

I’m yet to try it and my confidence in UE4 that this will just work has diminished.

***** FINAL SOLUTION! *****

I did not want to attach the object to player to turn on when I need. I only need a few objects per level the player will interact with so I figured:

  • create a new folder and put all my inventory type actors in it.
  • set them all to invisible
  • The animation plays and at the end of the animation it sets the animated object visibility to disabled
  • In my level blueprint (like above in first post), the end of the animation trigger simply attaches the inventory object I want to the player and turns on the visibility for it.

It is not ideal, but hopefully if anyone gets stuck this might help you out.