Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Particle Trigger
#1
Hello,

I just recently purchased obi rope and I have to say, it simulates beautifully. However I was wondering if an Obi Particle Trigger is possible. I want particles that are inside of the trigger to have different properties. For example I have a body of water and when a particle enters the body of water I want the drag to increase and the gravity to change.

I noticed the ObiSphericalForceZone, and this was a possible solution for the effect I wanted to achieve, however when the rope entered the sphere it was thrown out of the water, and placing many spheres under the water wasn't desirable.

For now I just created an obi collider with high friction under the water. It looks okay, and it stops the rope from sinking
Reply
#2
(15-01-2018, 06:50 PM)Riscii Wrote: Hello,

I just recently purchased obi rope and I have to say, it simulates beautifully. However I was wondering if an Obi Particle Trigger is possible. I want particles that are inside of the trigger to have different properties. For example I have a body of water and when a particle enters the body of water I want the drag to increase and the gravity to change.

I noticed the ObiSphericalForceZone, and this was a possible solution for the effect I wanted to achieve, however when the rope entered the sphere it was thrown out of the water, and placing many spheres under the water wasn't desirable.

For now I just created an obi collider with high friction under the water. It looks okay, and it stops the rope from sinking

Hi!

You can use regular triggers and callbacks to do what you're looking for.

Create a trigger collider (as you'd normally do in Unity), then create a custom script and register to the solver.OnCollision event. You'll get a list of all particle contacts every frame, including those against triggers. Then you can do anything you like with these particles. Note that changing the gravity per-particle is not possible, but you can calculate and apply a buoyancy force to your particles that counteracts gravity.

See:
http://obi.virtualmethodstudio.com/tutor...sions.html
Reply
#3
Hey! that was a quick response.
This is exactly what I was looking for, I'll check it out later today.
Reply