You could reset the yaw to 90 degrees or -90 degrees everytime the gun try to go beyond the limit.
Ex:
rho=gun.getEuler()
if 90 < rho[0] < 180:
---> rho[0]=90
elif -180 < rho[0] < -90:
---> rho[0]=-90
gun.setEuler(rho)
Last edited by Chapre; 09-21-2010 at 02:36 PM.
|