- Home /
Player registering collisions where there are none
I'm trying to implement a jumping mechanic using rigidbody.AddForce. In order to ensure the player can only jump when on the ground, I'm switching a boolean when OnCollisionStay is called. For some reason, no matter where the player is or whether or not it's actually touching anything, OnCollisionStay is called every frame no matter what. I've logged to the console the name of the gameobject it's colliding with as well as the collision point, and no matter where the player is it always registers a collision with the ground plane at the point that is directly underneath the game object (which often is not on the plane). Anyone have any ideas on what might be causing this?
Edit: Also just realized, what's weird is that the player object is still falling back to the ground when it is in the air, so although OnCollisionStay is called and the ground plane is the object supposedly being collided with, no actual collision is taking place.
Your answer
Follow this Question
Related Questions
Flying Controls Collision Issues 0 Answers
Why there is no Collider.IsTouching(...) ? 2 Answers