Skip to main content
added 233 characters in body
Source Link
Serg
  • 393
  • 5
  • 19

I have a vehicle with custom wheels which are connected to it by the HingeJoint components. Everything works perfectly when using this car in single-player mode:. Wheels are actually as Cylinders. They have HingeJoints attached through which they are bound to the vehicle's Rigidbody. Then I set JointMotor.force and the wheels are forced to rotategetting rotated and they move the vehicle is moving. It all works very naturally in terms of physics, I don't need to emulate anything. 

Still, there is an issue with network synchronization in multiplayer mode and I have no idea how to solve it.

It's said that the proper way to sync the position of a physical object is to use rigidbody.MovePosition(), but any manipulation with Rigidbody leads to the collapse of the vehicle hinge-joints. The only method that works is setting transform.position directly. But this is not recommended for physics and it doesn't allow to synchronize the vehicle smoothly with no twitching. Is there a way to solve this somehow?

I'm using Photon for networking (if it matters in the question context).

I have a vehicle with custom wheels which are connected to it by the HingeJoint components. Everything works perfectly when using this car in single-player mode: the wheels are forced to rotate and they move the vehicle very naturally. Still, there is an issue with network synchronization in multiplayer mode and I have no idea how to solve it.

It's said that the proper way to sync the position of a physical object is to use rigidbody.MovePosition(), but any manipulation with Rigidbody leads to the collapse of the vehicle hinge-joints. The only method that works is setting transform.position directly. But this is not recommended for physics and it doesn't allow to synchronize the vehicle smoothly with no twitching. Is there a way to solve this somehow?

I'm using Photon for networking (if it matters in the question context).

I have a vehicle with custom wheels which are connected to it by the HingeJoint components. Everything works perfectly when using this car in single-player mode. Wheels are actually as Cylinders. They have HingeJoints attached through which they are bound to the vehicle's Rigidbody. Then I set JointMotor.force and the wheels are getting rotated and the vehicle is moving. It all works very naturally in terms of physics, I don't need to emulate anything. 

Still, there is an issue with network synchronization in multiplayer mode and I have no idea how to solve it.

It's said that the proper way to sync the position of a physical object is to use rigidbody.MovePosition(), but any manipulation with Rigidbody leads to the collapse of the vehicle hinge-joints. The only method that works is setting transform.position directly. But this is not recommended for physics and it doesn't allow to synchronize the vehicle smoothly with no twitching. Is there a way to solve this somehow?

I'm using Photon for networking (if it matters in the question context).

edited title
Link
Serg
  • 393
  • 5
  • 19

Network Unity network player synchronization issues with HingeJoint(s)

edited body
Source Link
Serg
  • 393
  • 5
  • 19

I have a vehicle with custom wheels which are connected to it by the HingeJoint components. Everything works perfectly when using this car in single-player mode: the wheels are forced to rotate and they move the vehicle very naturally. Still, there is an issue with network synchronization in multiplayer mode and I have no idea how to solve it.

It's said that the proper way to sync the position of a physical object is to use rigidbody.[MovePosition][2]()rigidbody.MovePosition(), but any manipulation with Rigidbody leads to the collapse of the vehicle hinge-joints. The only method that works is setting transform.position directly. But this is not recommended for physics and it doesn't allow to synchronize the vehicle smoothly with no twitching. Is there a way to solve this somehow?

I'm using Photon for networking (if it matters in the question context).

I have a vehicle with custom wheels which are connected to it by the HingeJoint components. Everything works perfectly when using this car in single-player mode: the wheels are forced to rotate and they move the vehicle very naturally. Still, there is an issue with network synchronization in multiplayer mode and I have no idea how to solve it.

It's said that the proper way to sync the position of a physical object is to use rigidbody.[MovePosition][2](), but any manipulation with Rigidbody leads to the collapse of the vehicle hinge-joints. The only method that works is setting transform.position directly. But this is not recommended for physics and it doesn't allow to synchronize the vehicle smoothly with no twitching. Is there a way to solve this somehow?

I'm using Photon for networking (if it matters in the question context).

I have a vehicle with custom wheels which are connected to it by the HingeJoint components. Everything works perfectly when using this car in single-player mode: the wheels are forced to rotate and they move the vehicle very naturally. Still, there is an issue with network synchronization in multiplayer mode and I have no idea how to solve it.

It's said that the proper way to sync the position of a physical object is to use rigidbody.MovePosition(), but any manipulation with Rigidbody leads to the collapse of the vehicle hinge-joints. The only method that works is setting transform.position directly. But this is not recommended for physics and it doesn't allow to synchronize the vehicle smoothly with no twitching. Is there a way to solve this somehow?

I'm using Photon for networking (if it matters in the question context).

Source Link
Serg
  • 393
  • 5
  • 19
Loading