Hi I am a beginner and have a question, I use the quaternion funktion to let the turret of my tank rotate to the point where the mouse looks , but i want that the turret use only the y axis ( i want the x seperate for the cannon ) can i declare this in the quaternion function or it is not possible ?
Turrettarget is a Vector3 position from a camera raycast
var rotate;
rotate = Quaternion.LookRotation (Turrettarget - Turret.transform.position);
Turret.transform.rotation = Quaternion.Slerp (Turret.transform.rotation, rotate, rotationmodifier * Time.deltaTime );
can someone give me an advice how I restrict the x,z axis in this function ?
thanks for help