Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi Collider
#3
(28-03-2019, 06:53 PM)josemendez Wrote: Hi Laura,

There's no way to guarantee 100% the rope won't slip outside that hole under any circumstance, so keep that in mind if this is a game-critical feature. This is because time is a discrete quantity in simulations, and (given high enough velocities/tensions) particles might be inside the hole one frame, but outside of it the next frame, without having ever collided with the colliders in either frame. This is exacerbated by the fact that VR controllers aren't part of the physical simulation (they do not have linear/angular velocities). Instead they are "teleported" from frame to frame, by directly altering their transform. So, by moving the controller fast enough you can simply teleport the hole to a new position, far away from the rope, and the rope will never know that you did.

This issue is commonly called "tunneling" and is very common in all game engines.

There's two possible ways to alleviate it: add the ObiKinematicVelocities component to your controller, this will tell Obi to calculate approximate velocities for the controller so that CCD (continuous collision detection) can kick in. Another way to prevent tunneling is to advance the simulation using smaller time steps. This can be accomplished by increasing the amount of solver substeps, or by decreasing Unity's fixed timestep. Still, both approaches will only make tunneling less likely, as it cannot be completely eliminated. You should also consider limiting the effective speed at which the user can move the controller, so that you can have a upper bound on the controller velocity.

See:

http://obi.virtualmethodstudio.com/tutor...olver.html

Ok, thanks a lot Jose!!

Regards!!

Laura.
Reply


Messages In This Thread
Obi Collider - by Laura - 28-03-2019, 06:02 PM
RE: Obi Collider - by josemendez - 28-03-2019, 06:53 PM
RE: Obi Collider - by Laura - 30-04-2019, 10:38 AM