Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Applying custom forces - AddWind or AddParticleExternalForces?
#2
(16-04-2018, 01:39 PM)jabza Wrote: Hi,

I'm generating Drag and Lift force vectors that I would like to apply directly, ideally avoiding AerodynamicConstraints.

As far as I can tell, there are two ways to apply external forces to particles: Oni.AddWind and Oni.AddParticleExternalForces.

I was wondering how these APIs differ, and when each should be used?

Finally, for this situation, should I be applying forces differently if UsesCustomExternalForces is set, what exactly does this mean?


Much appreciated.

Hi there,

You should use AddParticleExternalForces().

AddWind() adds wind for each particle (direction and intensity vector), that is used to internally calculate drag and lift forces for all particles in each cloth triangle using the thin airfoil aerodynamic equations.

AddParticleExternalForces directly applies a force to each particle. So if you are calculating your own drag/lift forces, you should use it instead of AddWind.

UsesCustomExternalForces is deprecated and will be removed in 4.0. For now it sits there to ensure compatibility with old versions. It was used to differentiate between wind and external force, but now two separate methods exist (AddWind and AddParticleExternalForces) so it is no longer used.
Reply


Messages In This Thread
RE: Applying custom forces - AddWind or AddParticleExternalForces? - by josemendez - 16-04-2018, 02:30 PM