Quantcast
Viewing latest article 9
Browse Latest Browse All 104

How to get global up vector?

I have a character who needs to jump, but it also can change rotation a bit (lean forward/backwards) which prevents it from jumping properly. Here's my jump code: if ((isGrounded)&& (Input.GetButtonDown("Jump"))) { this.rigidbody.isKinematic=false; kinematic=false; isGrounded = false; jumping = 3; this.rigidbody.AddForce(new Vector3 (0,jumpForce,0)); }

Viewing latest article 9
Browse Latest Browse All 104

Trending Articles



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