Hi, I’ve been trying to make the camera start at the correspondent main building for each player but no matter what I do it always starts in the middle, any idea on how to fix this issue?
Hi there, good question. I added some code to the camera controller to move it to above the base at the beginning.
In the start() callback, try and get a hole of your player’s base and then move the camera so it’s looking at it. Let me know if that helps, or if you want more details.
Hi, thank you for your reply!
So I have been trying to get the list of the buildings for the player in the start() callback and the OnStartAuthority() of the camera controller but they are being called as soon as you press the button to either host or join a lobby, therefore getting an empty list of the player’s building because they haven’t been spawned yet
Any idea how to solve this? Or am I misunderstanding what you ment?
Best regards
You don’t need to use the buildings list. You can just FindObjectsOfType() to get a list of a all the unit bases. And then use hasAuthority, to check for you player’s base.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.