Question by
skyparticle99ii · Sep 10, 2021 at 03:47 PM ·
physicsrigidbodycolliderskinematic
How to check if kinematic rigidbody is overlapping anything in the scene?
So i have a kinematic rigidbody that i move in Update(). I need it to not move into any other objects in the scene, specifically static colliders. Somehow it is a very non-straightforward and frustrating thing to do in Unity.
How do i check if all the colliders that are attached to rigidbody overlap any other colliders in the scene? Like Physics.OverlapBox() but for entire rigidbody?
I need to check that because Rigidbody.SweepTest() doesn't detect a collider if it's already colliding with my object, so my object ends up passing through.
Comment