- Home /
Rotate camera around gameobject
I'm planning to rotate my scene's camera around a sphere while the camera keeps looking at the sphere...
i've already scripted touch navigation, i just need a proper snippet of the stuff i need to use, i can do the rest :)
Answer by DavidDebnar · Jul 01, 2011 at 08:54 AM
You have the script in standard assets, "Smooth Follow". And for rotating, make a empty gameObject, that is parented to your sphere, and make it rotate forever.
var speed : float = 5;
function Update() { transform.Rotate(Vector3.right Time.deltaTime speed); }
David
Your answer
Follow this Question
Related Questions
Set a steady angle between gameObject and Screen 0 Answers
Camera Movement 1 Answer
transform.parent can't go with gameObject.find 3 Answers
How to reactivate a gameObject? 3 Answers
C# locking Main Camera's Rotations 1 Answer