Hello everyone, Im trying to rotate a Cannon of a ship for aiming adjustment. I tried first using the eulerAngle adjustment but it didn't work, the whole angles and quaternion still confuses me. :(
here's my current code:
as you can see in the code i want to limit the rotation of the cannon between 0 deg and 10 deg of the z-axis.
asked Aug 05 '10 at 04:55 PM
tranform.Rotate() does not set the rotation, it rotates the current transform by a value. If you want to force the z-axis rotation to be always the value of your slider, you could do:
(Note that since leftCannons is already of type Transform you don't need to write leftCannons.transform)
answered Aug 05 '10 at 05:42 PM