My player doesn't take fall damage ... please help
I have this code in C#, everything's working, but my player doesn't take damages when falling … I don't know why… could you help me ?
if (falling) { falling = true; PlayerLegsAnimator.SetBool ("Jump", false); PlayerThirdPersonController.PlayerThirdPersonAnimator.SetBool ("Jump", false); if (controller.height == PlayerNormalHeight || controller.height == PlayerCrouchedHeight) { if (myTransform.position.y < fallStartLevel - 0.3f && !InWater) { //If we fell higher than 0.3 meters PlayerStatistics.PlayerGearAudioSource.PlayOneShot (PlayerStatistics.GearPlayerLandSound, PlayerStatistics.GearSoundVolume); //Play the land sound PlayerCameraAnimationComponent.CrossFade (PlayerCameraLand.name, 0.1f); //Play the camera land animation } } //Debug.Log ("Landed"); if (myTransform.position.y < fallStartLevel - fallingDamageThreshold) FallingDamageAlert (fallStartLevel - myTransform.position.y); }