Hello! So i have my first person controller up in the air on a cube in order to test this kind of Fall Damage script. You know as soon as the player hits the ground i want to see the message “Take Damage!” in the console. The issue here is that as soon as i hit play i get spammed by this message even when i am up on the cube. This is the script i use:
function Update(){
var up = transform.TransformDirection(Vector3.up);
if(Physics.Raycast(transform.position, -up, 10)){
Debug.Log("Take Damage!");
}
}