Search Unity

get collision before it happens/Optimizing Collisions

Discussion in 'Physics' started by EliJNemer, Jul 1, 2020.

  1. EliJNemer

    EliJNemer

    Joined:
    Aug 3, 2019
    Posts:
    123
    hello in my game i have written all the physics so as such my rigidbodies are all kinematic, i update physics manually in FixedUpdate and move objects with RB.MovePosiotion..

    so this way i can detect collision but can i get better collisions? for example when i have 2 spheres just passing eachother but touching. the collision is not detected.. also collisions happen way too late. i think this is because of discrete mode because the colliders need to wake up. so they touch the first time. they wake up then the next fixed update they collide.. this is pretty much 2 ticks too late.. is there a way to get the collision prediction? or determine if a collision will happen using unity collision detection?

    i know that this might be a part of the speculative ccd but this create huge inaccuracies.. colliders collideing far away from eachother..