- Home /
Connecting a camera and a light so they move together?
Newbie question...
I have a camera with a script and it follows my player gameobject.
The player gameobject moves based on keyboard input so all this is working fine.
I want to attach a light to the camera so the light moves as the camera moves (which of course is moving based on player GO movement).
How do I do this? If I drop the light on the camera it becomes a child object but it does not move with the light
Thanks for any help.
Answer by Henrique Vilela · May 08, 2011 at 04:50 AM
- Create an empty GameObject.
- Attach your script to this GameObject instead the camera.
- Put the camera and the light inside the GameObject you have created.
Your answer
Follow this Question
Related Questions
UNITY 3D: How to make the camera follow the player? Smoothly 2 Answers
How can i turn on/off the camera light of my phone? 1 Answer
How do I add a camera bounce effect every time the player lands? 0 Answers
Slow camera move speed? 2 Answers
Orient GameObject rotation to rotation of Main Camera 0 Answers