How can I position an attached mesh a certain distance in front of object it is attached to?

I am using an ‘Attach Actor to Actor’ node to attach a mesh to my character. How can I set it to be attached a pre defined distance in front of my character? I assume I have to + X in vector co ordinates but can’t figure out how to arrange this in blueprint.

Thanks in advance.

Hey ,

Attach To nodes are usually used in combination with Sockets, which you can read about here:

https://docs.unrealengine.com/latest/INT/Engine/Content/Types/SkeletalMeshes/Sockets/index.html

If you’re not using a SkeletalMesh for your character, or you don’t want to use Sockets, you can instead use an empty SceneComponent or ArrowComponent on your character and place it where you would like, then place Actor in that component’s Transform. Overall, that seems like a more complex way of handling it, however, and Sockets are easier to use.

Hope that helps!

Hi ,

Thanks for response again. I have had a look at sockets but they don’t seem appropriate for what I am trying to achieve. mesh that I am attaching to character is a football (soccer). gameplay that I am trying to achieve is only very simple so it does not have to behave like a football would i.e. move different amounts dependant on how hard it is kicked, it just needs to stay a certain number of units in front of player (on ground) until a key is pressed, which detaches it from current character and passes it to next closest character (who is then possessed).
For this reason I don’t think that Scene or Arrowcomponents will be appropriate either?
Thanks for your help.

I would probably use a Scene or Box component in your character Blueprint. In Components tab, you can position component in front of character. I suggested using a Scene or Arrow component, but any component that is set to not show up in level should be fine. What you’re really using component for is its location, which you can reference in Blueprints.

So in your Player Controller (or Character, wherever your character controls are), you can get location of component in character you wish to pass ball to. If you’re more descriptive of how you’re moving ball between players, I can help you get this set up if you need help.

I understand what you mean now. Sorted thank you.

Fixed like this:

Thanks again !