Attached Actor not following scene component!

Hey again,

So I’m having a problem that’s very strange. I have an actor that on begin play spawns an actor and attaches to a scene component.

The parent actor then moves to a different location and the player character can grab the attached spawned in actor. This all works without issue; the attached item follows, no problem.

The issue is the player has to place the spawned in actor back onto the original actor. Now the spawned in actor is placed back to the correct spot and looks like it attaches to the scene component no problem but when the parent actor goes to move back to its original location the attached actor does not follow it anymore.

The code for attaching the actor on begin play and when the player attaches it are the same. So, I’m not sure if its a bug or if I’m missing something else.

Hi Koldmilk,

What happens if you change the “SnapToTarget” in the Location and Rotation Rules to “Keep Relative”?

Changing the Location Rules on the “AttachActorToComponent”
doesn’t seem to have an affect.

image

I had a feeling you were going to say that - but was worth a try…

Are you sure AttachPoint is always valid and correct?

Hmm, what could cause it to become invalid? How should I check?

Testing it’s Actor first should cover it:

Seems the component is valid. Oddly using an On Tick event and getting the world location of the “Attach Point” shows it is moving so probably an issue in the attached actor.

I just noticed you’re turning physics off before attaching, this post may help:

1 Like

Thanks! that post helped me noticed something.

Embarrassingly, I had a call in another part of the blueprint that was causing it to detach right after attaching.

Killing that seems to have fixed it.

1 Like