Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom colliders / Interaction with Obi Particles
#8
(23-06-2017, 06:08 AM)davidrousal Wrote: can AddParticleExternalForces be called in ObiCollision? Because if I "replace" SetParticleVelocities with it the particles doesnt seem to be affected.

OnCollision is called at the end of each frame, just before forces are reset. You should wait for the beginning of the next frame before applying forces using these methods, since external forces are applied at the beginning of the timestep.

Edit: the reason for this "deferred" application of forcesĀ is that they are applied in a special way for fluid and cloth particles, so they cannot be immediately added to velocities.

Also, keep in mind that your code applies accelerations, not forces. Depending on your particle masses, the same force can have greater or lesser effect than an acceleration.
Reply


Messages In This Thread
RE: Integration / Water Areas - by josemendez - 20-06-2017, 09:37 AM
RE: Custom colliders / Interaction with Obi Particles - by josemendez - 23-06-2017, 08:21 AM