- Home /
RotateAround doesnt work
Hey guys
I want to rotate the main-camera in my scene around the "Vector3.zero" point. Although it should rotate around "Vector3.zero" it rotates around its own transform. What am i doing wrong?
Here's my code:
transform.RotateAround (Vector3.zero, Vector3.up, 20 * Time.deltaTime);
Thanks
Hi,
could it be that the x and Z coords of your gameObject are 0. Is that the case and you are trying to rotate around the y-axis than of course it looks alike as it rotates around his own transform. For instance try to set x or z to 5. Than you should see a rotation around the desired point.
No, i want to rotate my $$anonymous$$ainCamera which is at -10,2.5,0.
Answer by tayyab43 · Feb 08, 2015 at 11:35 AM
Make a vector3 variable call it "Zero" and store (0,0,0) and put zero where vector3.zero is. Try it, i think that should work
Thats not working, too... :( $$anonymous$$aybe its a problem of Unity?
hmm, look at the documentation for rota$$anonymous$$round