Hello everyone,
I have 3d scene in that i have one sphere(Ball) object which is rolling on the floor.
Now i want my camera to follow this sphere. I have tried different script but not able to get the expected result.
The script i have attached to the ball is here:
function Start () {}
function Update () {
FixedUpdate();
}
function FixedUpdate () {
rigidbody.AddTorque (Vector3.right * 10);
}
Camera Script :
public var target : GameObject;
public function LateUpdate(){
transform.LookAt( target.transform );
}
with this script , it is just looking towards my ball. But how to make my my camera to follow this sphere?
Thanks for your help and support…