- Home /
Making camera follow a prefab in network multiplayer mode
Hello, I followed a tutorial on youtube to create a multiplayer game using kinect. Now i'm not able to understand how to make the camera follow a prefab which pops into the scene only after the server is created or joined into. Any help would be appreciated
There is a camera follow script in standard assets. Import that, and once the object is spawned, set the new object as the camera's target in script. That should be all you have to do. I can give a more verbose answer once I reach a computer if you need more help.
well, thanks for that but i wanted to build the game, so you cannot do it after you build it.. can you? :(
Of course! Import the character controller assets, put the camera controller on the camera, wire it up, and set the target at runtime. $$anonymous$$ake sure it works in the editor and build it; it should work exactly the same when built.
well, I would have loved if your answer was a scripted one, n not assigning the target manually. Nevertheless thanks for your tym ....
It is scripted...you can't set the target manually at runtime!
Answer by falconer · Mar 27, 2013 at 03:44 PM
Got it...Finally, if (!target)
target = GameObject.Find("Car(Clone)").transform;