Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How can i detect if two ropes are twisted
#6
(01-07-2020, 07:42 AM)rand123 Wrote: Hi i use this function to detect collision between 2 ropes. The debug log returns results when each particle of a single rope collides with itself or with other particles belong to that same rope. The two ropes do not twist themselves yet. Is my code the right way to do it ? What I want to achieve is if Rope A collides with Rope B, I want to detect Rope B only. I dont want to detect if particle of Rope A has collided with itself.

Then look for contacts where the actor for contact.particle and for contact.other are not the same. Right now you're only checking the first particle in the contact.


(01-07-2020, 07:42 AM)rand123 Wrote: Another question, how do I set two ropes and more ropes twist them selves as a default state when the game starts ? I do not want to create and edit every single rope. Is there any way to create a knot in edit mode and save that state into play mode ?

Easiest way is to edit the paths, that's what they're designed for: to set the initial state/shape of ropes. You could write a script to store all particle positions/velocities at runtime, then set them when the scene starts. See:
http://obi.virtualmethodstudio.com/forum...p?tid=2201
Reply


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