playMaker

Author Topic: question about photon[SOLVED]  (Read 1404 times)

Ofonna

  • Full Member
  • ***
  • Posts: 230
question about photon[SOLVED]
« on: March 14, 2017, 01:13:33 PM »
hi guys,
please i'm still learning to use photon and there's something i don't understand,

im going through the players fsm and i'm trying to understand why we have to set and lerp the position over the synced network if the player isn't ours using the "get is mine action". i understand that we have to set the position and rotation over the network if the character is ours but whats the point of that if it isn't ours.

thanks
« Last Edit: March 15, 2017, 02:53:00 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: question about photon
« Reply #1 on: March 14, 2017, 02:06:27 PM »
Hi,

good question, always tricky when starting with networking :)


 ok, let's assume we have two players Player A and Player B

Player A plays on Computer A
Player B plays on Computer B

Player A must see where Player B is
Player B must see where Player A is

Player A is represented in the game using Instance A
Player B is represented in the game using Instance B

Instance A photonView will have "is mine" true on Computer A
Instance A photonView will have "is mine" false on Computer B
Instance B photonView will have "is mine" true on Computer B
Instance B photonView will have "is mine" false on Computer A

Player A can see Player B on Computer A because Instance B is lerping its position based on what the network is sending from Computer B for Instance B

or we can say:

Player B moves Instance B on Computer B
Instance B on Computer B will send its position over the photon cloud
Instance B on Computer A will receive its position from the photon Cloud
as a result Instance B on Computer A is at the same position than Instance B on Computer B

Does that make more sense? which statement above do you find not logical or giving you problem to understand?

 Bye,

 Jean
« Last Edit: March 15, 2017, 02:39:29 AM by jeanfabre »

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: question about photon
« Reply #2 on: March 14, 2017, 03:06:38 PM »
thank you so much, it all makes sense, so in order to view the other player's exact movement, we have to set it's position over the network. i've gone through some of the documentation to get a better understanding. i wish the actions were shown instead of just the fsm and hopefully we get a video tutorial series on the official playmaker youtube account for photon :D
« Last Edit: March 14, 2017, 10:47:53 PM by Carmichael »