Download

Setting pawn world location not accurate when pawn is decelerating??

When player moves the pawn, I set a cameraLocation vector to the pawn’s world location.

Then in event tick I interpolate the camera from it’s current position to the camera location, but the pawn snaps back a little.

368f23ebc7d47cbf232788e17b7863f8b041a2fa.jpeg

Why does the pawn snap back a little? The pawn moves forward, then moves back just a tad. ** It’s like the pawn’s world location doesn’t get set during the pawn movement’s deceleration.**

God **** it, alone again.

i figured it out, make sure you check that GetVelocity != 0,0,0 before setting your pawn’s location vector. If you don’t check for velocity you’ll be setting the pawn’s location without taking it’s velocity into consideration.

Keep in mind I’m using floatingpawnmovement for it’s deceleration/acceleration feature.