Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Trouble telling Unity when to do things

$
0
0
I am having some trouble getting unity to do things in the order that I want them done. I have a fall damage system worked out, but it subtracts your health when you in the air. I don't understand how to make it apply the damage once you have hit the ground. verticalMove = Vector2(rigidbody.velocity.y, 0); if(verticalMove.magnitude > triggerFall) { var speed = verticalMove.magnitude; var damage = damagePerFall * verticalMove.magnitude; var otherScript : Health = GetComponent(Health); otherScript.health -= damage; }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>