Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question DOTS Physics fast moving objects collide before touching other objects.

Discussion in 'Physics for ECS' started by aducceschi, Jul 21, 2022.

  1. aducceschi


    Feb 9, 2022

    I have a ball and a surface that are both entities using the new DOTS Physics Package.

    When the ball moves fast (more or less the same speed as when you throw a ball with your hand),
    the ball collides with the surface around 20 cm (0.656168 ft) before touching the surface and bounces back.

    This only happens if it moves fast.

    Does anyone know how can I change this behaviour or at least reduce it?

    Thank you.

    EDIT: I have found a float called CollisionTolerance by doing this:

    Unfortunately it says its read only and I can't reassign it. I tried to create a new Collision World and the replace the current world with the new one but to no avail. I can't even change the value on the new world. Any ideas?
    Last edited: Jul 21, 2022
  2. Krooq


    Jan 30, 2013
    I think the way to do this in DOTS is to change the solver iteration count which of course affects the entire simulation, not just a single entity as the collision detection mode in gameobject based workflows would.

    You could try moving the entity to a location that ensures it will or wont collide during the simulation to account for this tolerance. Usually for fast moving objects one needs to do some manual fudgery.

    aducceschi likes this.