Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbody gets stuck inside mesh collider
#1
Hello!

I am trying to simulate tyres being thrown at objects. The issue is that on certain meshes, possibly smaller ones (if I use a large cube set up as a wall for instance I don't seem to have this issue) the tyre gets 'stuck' inside the collider.

This only seems to happen with mesh colliders and not box colliders for instance.

I am using ObiActor.AddForce(force, ForceMode.Impulse) to imprint velocity on the tyre object in the direction I need.

   

This first happened as I was trying to make the tyre 'stiffer' and upped the 'shape matching' iterations value on the solver. If I go from 1 to 5 for instance, I thinkm I get more stiffness but my fps gets really low.

My understanding is that I have to increase the number of substeps in the obi solver to get a 'stiffer' result but again I get much lower fps.

I tried compensating b y increasing the unity fixed time step. With a value of 0.05 the tyre is really soft again and still enters the collider. With fixed time step set to 0.02 and 4 substeps the tyre bounces off fine but looks really 'soft'.

Here are my settings

               

is there a combination of settings that would give me what I want? I tried to copy the settings from the deformable barrel sample, the only difference I can see is that the barrels are low poly and have a lot less particles on them.

I have also seen this post about using distance fields. Is that what I should do? If they are better why bother with colliders in the first place? Do we need both?
Reply


Messages In This Thread
Softbody gets stuck inside mesh collider - by michele_lf - 14-11-2022, 03:46 PM