[Question] Photon Rigidbody Collision Problem
Options
crossposted: https://www.reddit.com/r/Unity3D/comments/85r5tz/photon_rigidbody_collision_problem/
I've wasted several hours trying to figure this out and really need some help...
I'm working on a golf game that has a collision system that works great locally, but not when networked. Each player controls a ball (with a sphere collider and rigidbody), which moves over mesh colliders (in most cases I'm not able to substitute primitive colliders). The balls have both PhotonTransformViews and PhotonRigidBodyViews.
Photon Transform View:
Synchronize Position:
Enable teleport = yes | Teleport if distance greater than = 0.9 | Interp option = Lerp | Lerp speed = 1.5 | Extrapolate option = Disabled | Draw sync position error = yes
Synchronize Rotation:
Interpolation Option = Lerp | Speed = 1.5
PhotonRigidbodyView:
Sync velocity = yes | Sync ang velocity = yes
Ball rigidbody:
Interpolate: None | Collision Detection: Continuous Dynamic
Say Player A and Player B are playing a game. Player A, from his perspective, behaves normally. Yet Player B's perspective of Player A is wrong. The rigidbody clips through the mesh colliders on the floor. It is a hard to reproduce bug. It may be because the PhotonRigidbodyView doesn't perform correct Continuous collisions. I suppose one option I have is to try all physics on the master client (server).
I've wasted several hours trying to figure this out and really need some help...
I'm working on a golf game that has a collision system that works great locally, but not when networked. Each player controls a ball (with a sphere collider and rigidbody), which moves over mesh colliders (in most cases I'm not able to substitute primitive colliders). The balls have both PhotonTransformViews and PhotonRigidBodyViews.
Photon Transform View:
Synchronize Position:
Enable teleport = yes | Teleport if distance greater than = 0.9 | Interp option = Lerp | Lerp speed = 1.5 | Extrapolate option = Disabled | Draw sync position error = yes
Synchronize Rotation:
Interpolation Option = Lerp | Speed = 1.5
PhotonRigidbodyView:
Sync velocity = yes | Sync ang velocity = yes
Ball rigidbody:
Interpolate: None | Collision Detection: Continuous Dynamic
Say Player A and Player B are playing a game. Player A, from his perspective, behaves normally. Yet Player B's perspective of Player A is wrong. The rigidbody clips through the mesh colliders on the floor. It is a hard to reproduce bug. It may be because the PhotonRigidbodyView doesn't perform correct Continuous collisions. I suppose one option I have is to try all physics on the master client (server).
0
Comments
-
Hi @sah123,
instead of using the PhotonTransformView and the PhotonRigidbodyView, you can try to use one of the solutions from the Lag Compensation documentation page.
If the golf balls can collide with each other, you however have to select one client (i.e. the MasterClient) who handles and resolves this kind of collisions.0 -
I will take a look - wasn't expecting a response, so thank you!0