Quantcast
Channel: Answers for "Checking if object is in air or on ground?"
Viewing all articles
Browse latest Browse all 8

Answer by dillon_kneeland

$
0
0
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; } }

Viewing all articles
Browse latest Browse all 8

Trending Articles



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