Search Unity

Continous collision detection

Discussion in 'Physics for ECS' started by Srokaaa, Jun 27, 2020.

  1. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    Is it possible to query Unity Physics for collision that will happen in the future if bodies continue to move with some constant velocity?
     
  2. MaxAbernethy

    MaxAbernethy

    Joined:
    Mar 16, 2019
    Posts:
    53
    If there is only linear velocity then you can use the CastCollider query. It does not handle angular velocity, which makes the problem a lot more difficult. You could do it by conservative advancement using the CalculateDistance query, it's just challenging to get good performance.