Place players at different positions (how other players perceive position of player)
Hi,
I am running into serious trouble while developing my application. Here is my problem:
Rough overview:
- I have players that spawn in the world, they instantiate and are using Leap Motion and VR
- I need the local player always be at 0,0,0 of the world coordinates.
- Other players should be placed differently depending on their internal number(locally they stay at 0,0,0 but for other players they are placed differently!).
So the idea I have is, I have the player avatar object, which has no photon transform view attached. On the local client I use that to move this avatar object wherever I need. The child objects have photon transform view attached.
What I observe is that the objects get warped back to their initial position. So let's say the player is at 0,0,0 and the photon transform syncs a child for 1,0,0...after I move the player to 5,0,0(It stays that value and does not change since it doesn't have a photon transform view) the child is now synced for -4,0,0 (it counters the manual transformation I did by calculating 1 - 5!)
What can I do here?
I am running into serious trouble while developing my application. Here is my problem:
Rough overview:
- I have players that spawn in the world, they instantiate and are using Leap Motion and VR
- I need the local player always be at 0,0,0 of the world coordinates.
- Other players should be placed differently depending on their internal number(locally they stay at 0,0,0 but for other players they are placed differently!).
So the idea I have is, I have the player avatar object, which has no photon transform view attached. On the local client I use that to move this avatar object wherever I need. The child objects have photon transform view attached.
What I observe is that the objects get warped back to their initial position. So let's say the player is at 0,0,0 and the photon transform syncs a child for 1,0,0...after I move the player to 5,0,0(It stays that value and does not change since it doesn't have a photon transform view) the child is now synced for -4,0,0 (it counters the manual transformation I did by calculating 1 - 5!)
What can I do here?
0
Comments
-
After messing around and looking closer at things.. I found a solution which seems to work.
My problem can be solved by adjusting PhotonTransformView. By replacing transform.position with transform.localposition it works (inside PhotonTransformView class). Can anyone explain to me why changing a parent's transform (with no photon transform view) has no(visual) impact to a child with photon transform view?0