How do I set the transform of all client users to that of the server user?
in Photon Bolt
I'm new to Bolt and I was wondering what the best way to move all clients to the location of the server user. How can I reference what the current transform of the server user is? Thank you!
0
Best Answer
-
Hello @Whickburglar,
There are several ways to do this.
The simplest way I imagine it to just flag your Server Player with Property State (you can create a Bool property, for example) marking is as the Server Player when attaching.
Other players on the game can list the entities and check that property, for example.
With the server player reference, you can just check its transform.
--
Ramon Melo
Photon Bolt Team5
Answers
-
Hello @Whickburglar,
There are several ways to do this.
The simplest way I imagine it to just flag your Server Player with Property State (you can create a Bool property, for example) marking is as the Server Player when attaching.
Other players on the game can list the entities and check that property, for example.
With the server player reference, you can just check its transform.
--
Ramon Melo
Photon Bolt Team5 -
Hey @ramonmelo ,
Thank you for the answer. How would I list the entities as a different player? Sorry, I'm new to this and I appreciate your help!0 -
Hello @Whickburglar ,
Take a look at our API Page: https://doc-api.photonengine.com/en/bolt/current/class_bolt_network.html#a532a94e2ec5699589400785822b1cf0f
By using the "BoltNetwork.Entities" property, you get a list of all entities loaded in the scene, from there you can just lookup for your server Entity and store it for future use.
--
Ramon Melo
Photon Bolt Team0