Collider Lifts me off Ground ??? And I'm afraid of heights !!!

Okay, I’m not really afraid of heights.

I have one friendly cube (or more) and I have some enemy cubes that move around on a terrain. But the enemies are double-secret cubes and they are invisible to my friendly cube…until they get close.

I’m trying to make them “visible” when they get inside a certain distance so I added a larger sphere collider to all my cubes and put a trigger on them…so when the larger sphere colliders touch, the dreaded enemy becomes visible.

However, my sphere colliders are not fully cooperating because the spheres totally encircle my cubes and because of physics, when the collider touches the ground, they elevate my cubes off the ground. I’m not sure how to set these sphereoid colliders so that my cubes can glide smoothly across the surface of my terrain.

Make sure the IsTrigger bool is checked on the collider, which in code will mean you need to be using the “OnTriggerEnter” callback as well. Another thing you can do is set the layers if you want that trigger colldier to only interact with the player, as this will make it easier on the physics side as well.