nHair Collision Event Data


#1

Anyone know of a way to get the collision event data from an nHair collision?

Doesn’t seem to be in the API.

e.g. You have a hair, it hits a plane, you get the position and magnitude of the collision, etc…


#2

May be you could use a trick.

  • Create an nParticle emitter and use hair as goal.
  • Emit particles until each particle will reach each nHair curve vertices.
  • Now set an initial state for particles and delete the emitter.
  • Now you can use the nParticle collisionTime per particle attribute to check the collision.
  • You can use all nParticles attributes to check all you want.

I have attached a very simple scene.

Ciao.

Dino