Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How can i detect if two ropes are twisted
#10
(03-07-2020, 09:40 AM)rand123 Wrote: Hi, thanks a lot for this. It works.

Is there any way I can detect 2 ropes not colliding with each other ? It seems to me the collision callback always returns collision result since the particles can collide with themselves.
I check for the count of ObiCollisionEventArgs. If there is 0 count means there is no collision. But the callback are for all the particles/actors in the scene. Is there any way I can set a specific collision call back of 1 single rope only ? Then check for the count of ObiCollisionEventArgs should solve whether the a rope is colliding or not.

Each frame the engine makes all contact information available to you directly. This is as efficient as it gets, as you're given direct access to the same information used by the engine to resolve collisions. Filtering it to suit your needs is completely up to you, you can of course keep a counter per actor and count the amount of contacts for each one if you wish.
Reply


Messages In This Thread
RE: How can i detect if two ropes are twisted - by josemendez - 03-07-2020, 10:24 AM