22-06-2022, 09:55 PM
(06-08-2021, 05:38 PM)WinterXYZ Wrote: Thanks for the reply!Hi, I'm having a similar problem to this. Did you ever find out how to chalge the collision filter on a specific particle, or find any other solution?
I've been using the filter variable already to configure various materials for different types of collisions (for example, structural materials like support beams allow objects to move through them).
I have tried to find a way to specifically access the first and last particle (as those are the ones that get pinned) to be able to change their collisions but I can't figure out how to do this.
This is a rough idea of the order my rope script goes through (it's very similar to the RopeNet script):
The closest thing I've come too is thinking is I need to use something like "rope.solverIndices[index value]" as, from what I can tell, this corresponds to each particle on the rope (and potentially they store the collision profile), but I can't actually access their filter data.
- Create the rope blueprint
- Set int filter
- blueprint.AddControlPoint(filter goes here)
- Then pin the points, and use ObiPinConstraintsBatch with AddConstraint(rope.solverIndices[0]...)
My thinking is a generate the rope with the filter profile I need, and then I do something likeThis way only that specific particle loses it's collision, but the rest remain intact.
- rope.path.point[value of particle to change].filter = ObiUtils.MakeFilter(ObiUtils.CollideWithNothing, 0);