The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

synchronize the rotation

chucky831
2020-03-02 10:27:29

Hi everyone, I'm starting with Photon. I wanted to understand how I can synchronize a rotation. In my game I have 2 players who rotate their weapon in the direction of the mouse. This is the code I made for the single player. I should do a PUN function for rotation so that each player sees where the other is pointing. How should i do?

Comments

S_Oliver
2020-03-02 11:17:12

Just slam a PhotonView and TransformView on your Weapon gameObject.

https://doc.photonengine.com/en-us/pun/v2/demos-and-tutorials/pun-basics-tutorial/player-networking

chucky831
2020-03-02 16:33:19

but and is the child of an object that moves I have to apply the photon view to both the player and the child?

Back to top