[Question] Photon Rigidbody Collision Problem

The whole answer can be found below.

Please note: 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! And we offer you support through 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.

[Question] Photon Rigidbody Collision Problem

sah123
2018-03-20 08:52:27

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).

Comments

[Deleted User]
2018-03-22 10:55:34

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.

sah123
2018-03-23 07:50:11

I will take a look - wasn't expecting a response, so thank you!

NoneType
2019-08-02 13:39:28

Hi @sah123,

I know it's a bit late but did you solve the problem?
I have the same issue for months and I still couldn't fix it.
(Especially Syncing the rigidbody)

Back to top