Answer the question
In order to leave comments, you need to log in
How can you limit the rotation of the cannon on a tank?
I can't figure out how to limit the rotation angle of the gun, the gun turns left and right, and if you don't set a limit, it will climb into the texture of the tank, how can this be fixed?
Answer the question
In order to leave comments, you need to log in
1. Get the direction vector of the tank.
2. Get the direction vector of the gun.
3. When turning the gun, check the angle between the direction of the gun and the tank. If it is greater than the angle N, then do not turn the gun.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question