Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Detect specific rope collision.
#21
(05-07-2022, 02:53 PM)josemendez Wrote: You can control collision behavior for each individual particle in the rope. This is done using collision filters, see:

http://obi.virtualmethodstudio.com/manua...sions.html

In-editor, filters are specified for each control point in the blueprint. At runtime you can set the filter value for each particle by writing into the solver.filters array.

Actually I didn't get it , can you please explain it little more ?
Reply
#22
(06-07-2022, 12:20 PM)Gauri7 Wrote: Actually I didn't get it , can you please explain it little more ?

Sure,

Each particle in Obi has a collision filter, colliders also have one. The filter is just a 32 bit integer that determines which particles can collide against which colliders (or other particles). It's composed of two parts: a category and a mask. The category is simply a value from 0 to 15, the mask determines which categories the filter is allowed to collide against.

The initial values of the filters for all particles in the rope are specified on the path editor: you give each control point a category and a mask, and each particle picks its filter values from the nearest control points.

At runtime you can modify the filter for each particle by writing into the solver.filters array (just like you would for any other particle property, like positions or velocities).

The collision scripting section of the manual explains how to deal with filters in detail:
http://obi.virtualmethodstudio.com/manua...sions.html
Reply
#23
Hello Again , Can I get all the collisions of one rope ? in ObiActor , not all collisions in solver , individual rope collision points ?

I have attached a ss , I want only collisions in green circle on that rope , not collisions at red circle
Reply
#24
(08-07-2022, 09:35 AM)Gauri7 Wrote: Hello Again , Can I get all the collisions of one rope ? in ObiActor , not all collisions in solver , individual rope collision points ?

I have attached a ss , I want only collisions in green circle on that rope , not collisions at red circle

Sure, you already have all collisions in the solver so just look for those that involve a specific rope. See "Retrieving the actor involved in a contact" in the manual: http://obi.virtualmethodstudio.com/manua...sions.html

Note that internally Obi does not make any distinction between particles belonging to different actors (ropes, cloth, fluids, etc). In fact, the engine does not know what an "actor" is. It works on particles, and treats all particles equal. All particles are tested for collisions simultaneously, and all contacts are solved regardless of the actors involved in them, which allows for efficient parallelization. It's up to you to select those contacts you're interested in.
Reply