Detect collision from a particular side
- by Fabián
I'm making a platform sidescrolling game. All I want to do is to detect if my character is on the floor:
function OnCollisionStay (col : Collision){
if(col.gameObject.tag == "Floor"){
onFloor = true;
} else {onFloor = false;}
}
function OnCollisionExit (col : Collision){
onFloor = false;
}
But I know this isn't the accurate…