Online collisions are completely inelastic

Options
Hello, I'm making an online racing game with Photon, and the collisions are behaving completely different when online or offline.

For example if a moving vehicle collides head-on with a stationary vehicle, the first vehicle is supposed to lose speed, and the second vehicle is supposed to start moving backwards. That's what happens when offline. But online, the collision is completely inelastic. The stationary vehicle rotates for a second, but it doesn't get any speed.

I have the game configured so each player is the owner of its vehicle, so they see it move smoothly. Is that the problem? Should I change it so all cars are owned by the master? Thanks!

Best Answers

  • NaBUru38
    NaBUru38
    Answer ✓
    Options
    I found the problem: I was just using PhotonTransformView, but I needed also PhotonRigidbodyView.
  • NaBUru38
    NaBUru38
    Answer ✓
    Options
    Scratch that. Having both views causes glitching. PhotonRigidbodyView does indeed update the vehicle's position and rotation, so PhotonTransformView should be removed.

Answers

  • NaBUru38
    NaBUru38
    Answer ✓
    Options
    I found the problem: I was just using PhotonTransformView, but I needed also PhotonRigidbodyView.
  • NaBUru38
    NaBUru38
    Answer ✓
    Options
    Scratch that. Having both views causes glitching. PhotonRigidbodyView does indeed update the vehicle's position and rotation, so PhotonTransformView should be removed.
  • NaBUru38
    Options
    Scratch that. Making the PhotonRigidbodyView synchronize velocities also causes glitches. I'm making my own view that updates velocities only. It's buggy for now, but when I'm done I'll publish it here.