how can i get a object to Rotate to a object on the x axis with out using look at i can’t do it and i’v try ed to do it. or just get it to look up on the y axis
You mean you want the x-axis to look at the object?
Quaterion xAxisForward = Quaternion.FromTo(Vector3.right, Vector3.forward);
transform.rotation = Quaterion.LookRotation(target.position - transform.position) * xAxisForward;
yep but it’s not working
What happens when you use that code. What axis is pointing at the target?
it tells me to put a ; at the end
What you could try to do is make a empty gameobject and make the object the parent and make it rotate when you want it to.
Make sure to put the empty gameobject facing the way you want it to rotate,
hope i helped
Well I would guess you are using javascript?
var xAxisForward:Quaternion = Quaternion.FromTo(Vector3.right, Vector3.forward);
transform.rotation = Quaterion.LookRotation(target.position - transform.position) * xAxisForward;
you wrote Quaternion wrong, just if people are still wondering