yenleidong wrote:Hello #ThePhotons,
I am happy to use this plugin.
I have one of kind enemy named enemy01, spawn randomly every 3 to 5 second, in 1 minute I have about 20 enemy01, some enemy01 already destoyed outside screen.
My question is how to create sync for peer for enemy01 position and angle for realtime?, include their existence begin their already created from host side and after peer get login?
Could you give me some simple example for ease my experiment.
Photon allows you to broadcast messages in a room.
To create or destroy object, send messages stating that. Other clients in the room should create or destroy objects accordingly.
To synchronize positions, periodically send position updates. On other clients, set position as message received and Interpolate positions between messages.
The most similar sample is demo-pool. It sends not current but target position which used by fish instances on all clients to move to.