Answer the question
In order to leave comments, you need to log in
How to rotate an object relative to the camera (axis)? How do I know which axis I'm looking at with the camera?
There is a little code:
void Update()
{
if (Input.GetMouseButton(0))
{
if(global.ChoosenGameObject != null)
{
global.ChoosenGameObject.transform.Rotate( 0f, speed * Input.GetAxis("Horizontal") * -1f, 0f, Space.World);
global.ChoosenGameObject.transform.Rotate(0f, 0f, speed * Input.GetAxis("Vertical"), Space.World);
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question