Best practice of setting up locally?
Options
Hi there
I asked another question about checking if you're the local player.
However that did not work as I thought it would.
I have a game, 1 vs 1, where I want the second joining player to change his camera - how can I do that? I tried making a truesyncbehaiviour script on the camera and checking if it was the local player -> then check if it was player 1 or 2. Didn't do anything.
Should I run anything local (that doesn't affect gameplay) in a normal Start() ? Last time I did that, both games changed the camera
I asked another question about checking if you're the local player.
However that did not work as I thought it would.
I have a game, 1 vs 1, where I want the second joining player to change his camera - how can I do that? I tried making a truesyncbehaiviour script on the camera and checking if it was the local player -> then check if it was player 1 or 2. Didn't do anything.
Should I run anything local (that doesn't affect gameplay) in a normal Start() ? Last time I did that, both games changed the camera
0
Best Answer
-
Hi @Code, @IonutzTamas exposed a good idea. You are free to anything in normal Unity's callback if they don't impact in gameplay, for example, a set of cameras or change their transforms. You have a "OnSyncedStart" callback where you can check if you are player 1 or player 2 and do the changes you want on the camera.5
Answers
-
I just thought of something, but it's too late to try it out.
What if you create 2 cameras, one looking normally and the other rotated and depending on who's the local player, activate one camera or another ?1 -
Hi @Code, @IonutzTamas exposed a good idea. You are free to anything in normal Unity's callback if they don't impact in gameplay, for example, a set of cameras or change their transforms. You have a "OnSyncedStart" callback where you can check if you are player 1 or player 2 and do the changes you want on the camera.5