- Home /
take off the rotation in a parent child relatioship
so im trying to make a ball move around and when it moves it rotates. the problem is that i want the camera to follow the ball around but if i make the camera a child of the ball when i move around the camera rotates. I want to stop the camera from rotating.
Answer by Caeser_21 · Mar 21 at 07:58 AM
Create a new script called "Camerafollow" and add the following to it :
public GameObject Player;
void Start()
{
}
void Update()
{
transform.position = Player.tranform.position;
}
NOTE : You have to add this script to the 'Camera' object
Your answer
Follow this Question
Related Questions
Why is a child object not rotating properly with parent? 1 Answer
Rotate Child with parent, keeping Child axis in the original direction 2 Answers
GameObject Parent-Child instantiation order 2 Answers
Parent object is getting generated why ?? 1 Answer
Why My Gun Rotate When i keep on pressing my mouse button and Move the Mouse 0 Answers