Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Figure out what Actor was collided with
#5
(06-09-2017, 08:01 PM)josemendez Wrote: Yes!

Not documented yet, but: given a contact, you can simply do this:


Code:
ObiSolver.ParticleInActor pa = solver.particleToActor[contact.particle];

The ParticleInActor struct contains the actor to which the particle belongs, as well as the index of that particle in the actor's arrays.

Awesome! 
My hack was a list of which actors I cared about, and particle range they contained..   Will gladly switch to using this method.
Reply


Messages In This Thread
RE: Figure out what Actor was collided with - by tbookout - 06-09-2017, 10:01 PM