Hello everyone. I have a problem about rotations of my camera. I have a cannon and it fires a ball. And I want my camera to follow the fired ball, and watch where the ball hits. So I did something like that :
var newBall = Instantiate(ball,ballSpawn.transform.position,ballSpawn.transform.rotation);
newBall.rigidbody.velocity = ballSpawn.transform.TransformDirection ( Vector3.forward * power * Time.deltaTime * 100 );
cameraObject.transform.parent = newBall.transform;
it works, but when the ball hits the floor, ball starts to roll. ( it’s a simple sphere with rigidbody ) So as long as ball rolls, camera rolls to. What I want is, camera will not change it’s position according to the instantiated ball object, it’ll just follow it. Any ideas ? Thanks