Obi Official Forum
How to add drag to a softbody? - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: How to add drag to a softbody? (/thread-3644.html)



How to add drag to a softbody? - michele_lf - 14-11-2022

Hello!

I am trying to simulate drag being applied to a moving softbody.

I am applying a force to the ObiActor using ObiActor.AddForce(force, ForceMode.Impulse) and I would like to see the same drag effect I can apply to a standard rigidbody in unity.

I tried adding an obi rigidbody component and increase the drag on the unity rigidbody but it seems to be disconnected from the ObiActor. If I apply the force to the unity rigidbody would that work with the softbody?

What is the best way of achieving this?

Many thanks!


RE: How to add drag to a softbody? - josemendez - 14-11-2022

(14-11-2022, 03:50 PM)michele_lf Wrote: Hello!

I am trying to simulate drag being applied to a moving softbody.

I am applying a force to the ObiActor using ObiActor.AddForce(force, ForceMode.Impulse) and I would like to see the same drag effect I can apply to a standard rigidbody in unity.

I tried adding an obi rigidbody component and increase the drag on the unity rigidbody but it seems to be disconnected from the ObiActor. If I apply the force to the unity rigidbody would that work with the softbody?

What is the best way of achieving this?

Many thanks!

Hi,

Rigidbodies and softbodies are completely unrelated to each other, drag applied to one of them won't affect the other.

Obi has a built-in atmospheric drag simulation, that can be enabled per solver. To enable it increase the solver's "damping" parameter to a non-zero value:
http://obi.virtualmethodstudio.com/manual/6.3/obisolver.html

If you want to implement your own advanced damping/drag system, you can also do so by using the particles API and adding your own external forces to each particle. See:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingparticles.html

kind regards,


RE: How to add drag to a softbody? - michele_lf - 15-11-2022

(14-11-2022, 04:36 PM)josemendez Wrote: Hi,

Rigidbodies and softbodies are completely unrelated to each other, drag applied to one of them won't affect the other.

Obi has a built-in atmospheric drag simulation, that can be enabled per solver. To enable it increase the solver's "damping" parameter to a non-zero value:
http://obi.virtualmethodstudio.com/manual/6.3/obisolver.html

If you want to implement your own advanced damping/drag system, you can also do so by using the particles API and adding your own external forces to each particle. See:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingparticles.html

kind regards,

Thank you so much! I have some reading to do then!   Gran sonrisa