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

Counteract current speed of player

$
0
0
How would I counteract the speed of the player after I stop pressing movement inputs? I need a solution that uses addforce modifying velocity causes lot's of problems for my player controller. ___ **Code i'm using to move:.** float x = Input.GetAxisRaw("Horizontal"); float z = Input.GetAxisRaw("Vertical"); rb.AddForce(transform.forward * z * speed, ForceMode.Acceleration); rb.AddForce(transform.right * x * speed, ForceMode.Acceleration); .

Viewing all articles
Browse latest Browse all 1264

Latest Images

Trending Articles



Latest Images

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