How do I check if an object is local?

Hi there
I'm developing a game using Truesync where two players have to play against each other. I want to have the local player always at the bottom of the screen - which could be solved by rotating the camera when it is player 2. However I am getting very confused as to why both players get synced with the rotation.
Currently I am checking the owner.id and if it's 2 the camera get rotated. I do this in Start() and so the Camera (which has no photon scripts on it) should only be rotated locally for player 2 right? But both cameras get rotated ?

It's rather confusing. I already have the two players move separately on each screen and synced correctly using SyncedUpdate. I just can't wrap my head around it when it comes to the cameras and doing stuff ONLY for the local player :neutral:

Best Answer

Answers

  • Thanks, I was looking for this. Although I found out that it wasn't the way to solve the problem :/
  • It also returns a nullreference for TrueSyncManager - even though the prefab is in the scene :(
  • @Code if TrueSyncManager is null, make sure that you have it already on scene, by the time you call this function
Sign In or Register to comment.