Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Collision Detection
#1
Hi everyone,

I am having a lot of trouble getting a rope to collide with my character model.  From the reading that I have done in these forums, my guess is that my rope diameter is too small for accurate collision detection.  I'm using ObiRopes to act as IV tubing so I need them to be fairly thin.  Is there anything that I can do to improve collision detection?  Unless I change rope size, there seems to be zero collision detection occurring.  I have tried increasing resolution to 1 without any improvement and also tried adding more steps in the ObiSolver.  The blueprint path for the rope is generated through script with a diameter of 0.03f.
   
   
   


Does anyone have any suggestions?
Reply
#2
(07-06-2020, 12:33 AM)mapleleaf4evr Wrote: Hi everyone,

I am having a lot of trouble getting a rope to collide with my character model.  From the reading that I have done in these forums, my guess is that my rope diameter is too small for accurate collision detection.  I'm using ObiRopes to act as IV tubing so I need them to be fairly thin.  Is there anything that I can do to improve collision detection?  Unless I change rope size, there seems to be zero collision detection occurring.  I have tried increasing resolution to 1 without any improvement and also tried adding more steps in the ObiSolver.  The blueprint path for the rope is generated through script with a diameter of 0.03f.





Does anyone have any suggestions?
Sounds to me like tunneling, plain and simple. Try reducing Unity’s physics fixed timestep (found in the time manager).

If you’re unsure about what tunneling is, see:
https://youtu.be/ms0Z35GY6pk
Reply
#3
(07-06-2020, 11:56 AM)josemendez Wrote: Sounds to me like tunneling, plain and simple. Try reducing Unity’s physics fixed timestep (found in the time manager).

If you’re unsure about what tunneling is, see:
https://youtu.be/ms0Z35GY6pk

Thank you for the quick reply,

I added kinematic rigidbodies to my character parts and set them to extrapolate.  This seems to have resolved the issue.  I'm no expert at any of this so I don't know if it is best practice or the most efficent way, however it seems to be working for me now.
Reply
#4
(07-06-2020, 06:35 PM)mapleleaf4evr Wrote: Thank you for the quick reply,

I added kinematic rigidbodies to my character parts and set them to extrapolate.  This seems to have resolved the issue.  I'm no expert at any of this so I don't know if it is best practice or the most efficent way, however it seems to be working for me now.

If you character is animation-driven, know that animation (or any system that sets the position/rotation of objects by setting their transform directly) basically teleport objects from frame to frame. So if you have a thin object and you teleport it from one frame to the next, chances are it will just skip over particles in your rope, completely missing collisions. This effect is called "tunneling" and is a common thing in all game engines.

Adding a kinematic rigidbody allows Obi to "predict" this teleport and use CCD, since the character parts now have a velocity vector. Same as using the ObiKinematicVelocities component, as indicated in the video I linked to.
Reply