Querying a Collider for a collision against another collider manually?

Hi!,

Is ther anyway to ask a collider if it is colliding (intersecting) another collider manually? I did not find anything about it in the collider class :S.

Thanks in advance,
HexDump.

No, thats not possible.
You can only use the OnCollisionXXX callbacks or raycasts

Ok, Thanks for the confirmation.

HexDump.

Just to note, if it’s a sphere collider, you can use the Physics.OverlapSphere function to get all colliders that intersect the sphere. If it’s a capsule and you only need to check if there is some collider intersecting then you can use CheckCapsule.

Couldn’t you use OnCollisionStay to check for a collision manually?

Hi!;

Sorry for the delay.

My objetive is to check collisions per frame while dragging an object. Wanna know if where mouse is now an object exists, if it exists push the object out of the colliding one (response force). I’m using OBB and can’t use spheres or capsules.

I think I will take another path. Just a question, I’m using a kinematic object for the one I’m moving to make it not be affected by forces. But when I collide with another object with rigidbody, this objects moves because of the collision. I have tried all posibilities (I think) to make the other object not move, for example, using Infinity for the mass, etc… but no way, it still moves when the object being momved collides with the other. Is there anyway to avoid this?.
What I just wanna do is that when the object under the mosue collides with another object, no penetration occurs, just that, don’t wnat any other physic reaction.

THanks in advance,
HexDump.