Spinning like crazy when using RInterp

Hello,
i have a problem when using RInterp to rotate a mesh. The mesh is a turret of a tank. It is the child of another mesh which is the body of the tank. If i don’t move the tank or if I move the tank forward or back the rotation of the turret works as intended. But when I rotate the tank and also want to rotate the turret, the turret spins like crazy. Any suggestions?

What are you trying to do? Get the tank to face the camera?

I want the turret to follow the camera. For example if I look to the right the turret should follow depending on it’s own rotation speed (which I will implement later).

Now the turret rotates synchronous with the camera. But I want the camera rotation to be as fast as the mouse moves but the turret rotation with a slower (realistic) speed. So there has to be a difference in the rotation speed.

Is the turret attached to the camera in the component list?

( At first I tried it in a pawn, but everything was linked to the collision, so matter what kind of maths you have, everything turns at once. The above code worked fine when the turret was a separate actor ).

This is my view port:

The curious thing is that if I don’t move the tank or drive forward or backward everything works fine. But as soon as i rotate the tank, the turret starts spinning around. So I think it has to do with the additional rotation from the tank body which messes everything up.

Yes, it’s because they all need to be separate. At the moment you have them all connected.

You need a independent root, and then the tank meshes and camera not connected to each other.

Gimme 2

Like this:

Total independence between the tank components and the camera.