Tank stabilization

Hi! I using standart mouselook script for my tank turret and gun and its works fine, but now I need vertical and horizontal stabilization. This means that the turret should not repeat the tank Y axis rotation, and rotate that axis only by mouselook script. Gun also should not repeat the rotation of the tank, but only on the X axis and also rotate that axis by mouselook script, plus the have a limit of rotation, taking into account the the tank rotation. Is that possible?

Here some pictures of tank stabilization

alt text

alt text

1 Answer

1

assuming that you need to stabilize the gun on target. you could set point in space by mouse and make the gun lookat that point.
you can also check the rotation and limit it if it too high. i hope it’s help somehow.

Yeah I think about it and maybe this is best solution. Now I need to understand how is should work.

–

search google for "unity lookat one axis" you may find several script examples for this. now make the turret rotate in one axis (left or right) and the barrel in the other axis (up or down).

–

anyone?...

–