Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Questions About Fixing Particle Translation and Removing Pin Contraint in Runtime
#2
(16-04-2020, 04:30 PM)relevantname Wrote: Hi, 

I have two questions;

- How to fix particle translation and orientation in runtime? (I want to fix a particle and than generate tethers in runtime)
- How to remove pin contraints in runtime?(I can add and clear pin contraints in runtime but cannor remove like the same way.)

Thanks in advance.

Hi,

I assume you're using Obi 4.X, if dealing with pin constraints manually.

To fix particle translation, set its inverse mass to zero. To fix its orientation, set its inverse rotational mass to zero. See:
http://obi.virtualmethodstudio.com/tutor...icles.html

Inverse mass
Inverse mass for each particle. An inverse mass of 0 means the particle's mass is infinite, so its position will be unaffected by dynamics (allowing you to override it manually).
Inverse rotational mass
Inverse rotational mass for each particle. An inverse mass of 0 means the particle's rotational mass is infinite, so its orientation will be unaffected by dynamics (allowing you to override it manually).

To remove pin constraints, call pinBatch.RemoveConstraint(constraintIndex);. See: http://obi.virtualmethodstudio.com/tutor...aints.html
Reply


Messages In This Thread
RE: Questions About Fixing Particle Translation and Removing Pin Contraint in Runtime - by josemendez - 19-04-2020, 10:02 AM