PhotonTransformView not working
Options
I'm having some trouble getting my player objects to correctly sync their movements across the network. I've got a PhotonTransformView attached to the prefab and it's observed by the PhotonView, it doesn't seem to do anything. When I move the player around their replicated doppleganger just sits there.
In a previous project, I was able to sync positions by observing the Transform itself, but that didn't work when I tried it for this game. I also tried using the NetworkCharacter class and adding the position to my player class' OnPhotonSerializeView, but neither of those worked either. I'm stumped. Any ideas?
Thanks,
Andrew
In a previous project, I was able to sync positions by observing the Transform itself, but that didn't work when I tried it for this game. I also tried using the NetworkCharacter class and adding the position to my player class' OnPhotonSerializeView, but neither of those worked either. I'm stumped. Any ideas?
Thanks,
Andrew
0
Comments
-
I think you have to put PhotonTransformView in PhotonView' s ObservedComponents list instead of Transform.1
-
Oops. I'm pretty sure that's just a result of when I took the screenshot. I'm certain I tested it with the PTV observed correctly, but I'll double-check when I get home tonight.erre said:I think you have to put PhotonTransformView in PhotonView' s ObservedComponents list instead of Transform.
As I said, I was bouncing around and trying a lot of different things.0 -
Yup, I just checked and things fail in exactly the same way with the PTV observed.0
-
Please update to the latest PUN version and let me know if the problem persists. Also, please let us know which Unity version you use.
Next week, we can take a look then. Sorry for the hassle.0 -
I'm already running the latest version of PUN, v1.61, and I'm on Unity version 5.2.1f1.
Edit:
Okay, so I apparently there's a version 1.64. I'm not sure why Unity didn't invite me to update when I was on the store page like it has other times. I force-imported the new files, but I'm getting the same error as before.0 -
Your interpolate AND extrapolate options on that screenshot are "Disabled".
Please simply reset the component to default values and check "Position" and "Rotation" synchronization.
And double check that the observed component of the PhotonView ends on "(PhotonTransformView)" and that everything is enabled.0 -
Thanks, Tobias. I followed your steps, but I'm still not seeing anything replicate. I also tried setting interpolate and extrapolate to "synchronize values," but that didn't work either.0
-
I really have no clue how this can happen, what your setup actually is.
Do you have any errors in the console?
Please add the SupportLogger component to a scene you load early in the game. Run that in 2 standalone builds and send me the logs.
I would also recommend doing a simple project from scratch to try it with minimal assets and no other distractions. Just the connect and the scene with a basic object that should sync. Basically, like the Boxes Demo.0