You could get the collision data and get the position of the collision and the normal and then if the rotation of the normal is less than some certain value you set then you set your canJump boolean to true.
(psuedocode-ish)
void OnCollisionEnter(Collision col) {
if (col.normal <= maximumSurfaceNormal) {
canJump = true;
}
}
↧