Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

rigidbody velocity on x axis and addforce on y axis ??

$
0
0
how can i make my object can use rigidbody velocity on x axis and addforce on y axis, i want to move my character with velocity and make jump and gravity with addforce, i try : vector3 forced = new vector3 (0, transform.position.y, 0); myRb.AddForce(forced); vector3 mov = new vector3 (transform.position.x, 0, 0); myRb.velocity = (move * speed); but it's not move like i want, how can i make velocity just on x axis, and addforce on y axis cause i want to make gravity and jump.

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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