- Home /
How to a camera not inherit scripts from a parent?
The camera is created with the player and moves with the play and I want it to just get created with the player not move with it.
You haven't provided any information on the setup of your player/camera. It sounds like there's a camera as part of the prefab. Is this the case? If it is, remove it from the prefab and also instantiate a camera at the same time, or deparent the camera after spawning your prefab.
If it's not part of the prefab then you probably have some code making it follow the player. It should be an easy fix.
Answer by Owen-Reynolds · Jul 01, 2013 at 11:35 PM
Making the camera a child of the player purposely says to move and spin as if it is locked to the player. There's no good way to be a child but not be locked that way. BeingAChild+havingAMoveScript will just fight each other. BUT, if you don't want it to act like a child, don't make it be one.
If you really want to create player+camera together (why?) then in Start the camera can "free" itself: transform.parent=null;
Your answer
![](https://koobas.hobune.stream/wayback/20220613105307im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
I can't look up and down because of animation on camera? 2 Answers
Adding and removing specific triangles ? 1 Answer
what does publisher url mean 1 Answer
Toggle map/Camera [JS] 1 Answer