Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Dynamic sphere getting stuck in rotating kinematic mesh collider

Discussion in 'Physics for ECS' started by doompr, Nov 30, 2021.

  1. doompr

    doompr

    Joined:
    Feb 27, 2015
    Posts:
    19
    Hey everyone,

    I've got a kinematic body using a mesh shape which rotates around its pivot by setting its angular velocity in a system that runs in the FixedStepSimulationSystemGroup and before the BuildPhysicsWorld step.

    Now I also have some dynamic sphere's rolling around, and sometimes the spheres get stuck inside the mesh. This usually happens whenever they get pushed to a static collider and then the only way for them to escape is by going into the kinematic mesh collider it seems. (Note: this also happens from time to time when the rotating mesh collider is dynamic.)

    After that happens they seem stuck in there forever, as if the kinematic body is hollow. Is there a way to prevent this, or is there a fix that can be applied to get them out if they get in?

    Thanks in advance!
     

    Attached Files: