Hi guys,
first month on UE, lot of fun.
I have a problem though.
I have :
-A ship pawn moving.
-A box actor, fixed location. On beginOverlap, it spawns a shield actor and tries to attach it to the ship - its location gathered from the collision.
-A shield Actor that sometimes manage to get attached.
Quite often the shield can’t get attached, yellow warning - the operation is aborted. Some debugging seems to show that the time the shield is spawned,there is no collision anymore, so I can’t get the ship location anymore.
How can I retain the contact to the ship ?
Promote it to variable didn’t help as it’s like all the rest in the lost in the overlap loop.
Hey there @Sirhom! Welcome to the community! So depending on how you want the shield to stick kinda like Katamari, you can pass the original impact location as the attach location. Are you delaying after the collision in any way? Or are you checking the overlap without using the overlap event?
I would probably add on that the impact location would probably need to be converted to a local offset of the ships position (an inverse transform node could do this pasing in the ship’s transform).
This is due to the ship moving and the impact location would be in world space so at the time of spawning could lag and be in an old position.
Thanks a lot guys.
Very interesting, pretty sure I’m soon gonna use that.
@SupportiveEntity
From the overlap event I get the ship actor, spawn the shield, and from the spawn I set the attachment. No delay no nothing.
@3dRaven
Exactly, the position getting old is my problem.
My mistake was to promote the location to variable.
Promoting the actor in a Do Once seemed to do the trick. I can get its location up to date and that seems to be working fine now.