Author Topic: assigning a player their own camera.  (Read 3458 times)

Follett

  • Guest
assigning a player their own camera.
« on: April 16, 2013, 01:19:36 AM »
I just finished the example game from scratch tutorial and was wondering how to go about assigning a player their own camera. I tried the simple method of parenting a camera to the player prefab and then saving the prefab and deleting the old camera in the scene but when a player joins they both follow the latest players camera.

Any tips on how to have a camera for each player?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: assigning a player their own camera.
« Reply #1 on: April 16, 2013, 11:42:40 AM »
1. Make sure that each player creates their own avatar via TNManager.Create.
2. Create a script attached to the prefab you're instantiating. In this script's Awake() function check -- TNManager.isThisMyObject? If yes, create/attach your camera.