Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Are Obi products going to be updated soon?
#4
(07-03-2019, 08:32 AM)StudioTatsu Wrote: I was doing tests with unity standard wheel collider which requires at least one rigidbody to work.

Wheel colliders and softbodies don't mix well becase they both model the same underlying system, but in very different ways. It's like using a projector on a screen to watch a movie, so to speak. Either use the projector or the screen, not both.

Softbodies are way too detailed for some aspects of tire deformation, and not detailed enough for many other important things.
Friction for instance, needs to be much more accurate than what softbodies can offer. Usually you want a curve-based friction model for wheels, while regular contacts (both in Obi and general purpose rigidbodies in most physics engines) use a much simpler linear piecewise cone approach that won't result in an engaging driving model.

Softbodies simulate a lot of phenomena that can just be omitted for tires, as they only add overhead and no discernible advantage: plasticity, work hardening, non-homogeneous density, etc.

Wheel colliders already account for tire deformation in their physics model, although they give no visual feedback of such deformation. There's many assets in the store meant to replace/extend wheel colliders and allow them to deform the wheel. Usually a simple vertex shader that procedurally squashes the mesh based on the wheel collider's feedback is cheap, convincing, and allows to decouple the physics model form the visual representation.

Edit: If you wanted, you could get both to work together (though I strongly advise against it). Wheel colliders do not need a rigidbody in the same GameObject, but they do need one up their hierarchy (the car rigidbody). Also, wheel colliders do not rotate by themselves as you probably already know. You have to set up a separate, rotating object to represent the wheel visually. So simply set up the wheel collider as usual, then create a softbody with some particles pinned where the tire meets the wheel rim and rotate it as you would with any other object. Note that the softbodies will not apply forces to the car, they will only deform in response to the floor. The wheel colliders still have the responsibility to prevent the car from falling trough the floor by applying forces to the rigidbody.
Reply


Messages In This Thread
RE: Are Obi products going to be updated soon? - by josemendez - 07-03-2019, 08:58 AM