Unexpected rotation of the gun's turret, How do i can solve that?

Video shows the problem

I am working on a gun turret game. The turret should rotate based on the rotation of the camera’s view, all is done perfectly. I am using FInterpTo to make the rotation smooth.

The problem is: Unfortunately, unexpected something else has done, When the rotation arrives at 180, the rotation will be reflected. I tried a lot and a lot to solve this problem but without any results. If anyone had the same problem, I hope to help me.

The blueprint of Turret Rotation with FInterp function

(Yaw rotation) variable represents the value of turret rotation


Have you tried using RInterpTo instead?

1 Like

The rotation starts from 0 to 180, then the value becomes -180 ( Negative sign ) so the problem begins from here.

If the rotation does not change from 180 to -180 and completes 181, 182, and so on, the problem will be hidden.

That doesn’t answer my question. I’m aware of the issue. Does using RInterpTo (using rotations) instead of FInterpTo (using floats) not solve this?

It didn’t occur to me that the problem could be there.
The solution is RInterp to

Thank you @DanM

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms