I am new to UE from unity and am recreating a top down space shooter game I made in unity as a learning project in UE. I’ve run into an with ‘RInterp To’ not working as expected after a physics collision.
RInterp To works perfectly to get the player ship to face the aim position, physics based movement and aiming of the ship is great… until the player collides with something that causes the ship to spin.
Once that happens, an angle offset is introduced depending on the collision - e.g. ship could face 20deg to the right of the aim position. Aiming still works moving the mouse, just with a constant offset. It is also possible to knock the aiming back into alignment with the right crash and resulting spin, it isn’t random.
I’ve checked that the root cube component I am trying to RInterp to face the aimpoint is still aligned with the ship mesh after the crash, it is. Also tried rotating the actor instead of the root component, tried with the delta time node connected to tick delta seconds. All the same result.
Confused …RInterp in Event Tick should always be trying to make the ship face the target right? - it’s like it thinks it is facing it, the mouse movement still works with an offset…but it isn’t. Likely something I’m not understanding about UE’s physics system vs. unity’s
Note removing the RInterp To and directly setting the rotation to face the aimpoint removes the problem, just isn’t the result I want - i.e. turn 180 degrees instantly.
Before a crash:
After a crash and spinning a little:
Blueprint aiming code:
(‘Aimpoint’ component simply follows the mouse cursor at the same height as the ship or ‘cube’.)
Appreciate any help you can provide.