Intersection of collision between slope and ground not toggling boolean using OnCollisionEnter

I’ve been having some problems with using a Rigidbody on a marble to roll up a slope, and then being able to jump after checking if the object is grounded or not. I’ve set up an OnCollisionEnter function, to set the bool isGrounded to true if the tag of the collided object is “Ground”, and then if not it’s set to false. However, when I roll the ball up the slope from the ground, the jump check never changes to allow the ball to jump. But if I jump onto the slope without just rolling onto it the jump check works exactly the way it is supposed to. Any ideas why this could be happening, and any possible solutions? I suspect it may have something to do with the frames that the collision is being checked, in that both colliders are being checked at the same time or something along those lines, but I have been searching for an answer to such a niche problem that I figured it’s be much more effective to ask for a catered answer to my problem specifically. Thank you!

It’s not a niche problem, it’s just that you ask the wrong question. Here’s a tip on searching on the internet, when you have no results when asking specific questions like “Intersection of collision between slope and ground not toggling boolean using OnCollisionEnter”, you should search for general ideas like “How to groundcheck”.

It almost never occurs that a problem has not been asked about before, especially one that has happened to a lot of people like yours (you can imagine you’re not the first that want to make a ball jump). Don’t worry about it, being able to do proper Google research is one the most valuable skill as a game dev haha.

That’s where your problem comes from, it’s not about what you want to do but how. I suggest you look into Raycasting :

and SphereCast :

Let me know if you need more details !