Quantcast
Channel: Answers by "Democide"
Viewing all articles
Browse latest Browse all 10

Answer by Martin Sharkbomb

$
0
0
What you can do is get the button and then check for the corresponding axis, like so: if (Input.GetButtonDown("Horizontal") && Input.GetAxisRaw("Horizontal") > 0) { // Move to the right } else if (Input.GetButtonDown("Horizontal") && Input.GetAxisRaw("Horizontal") < 0) { // Move to the left } Also be aware that the axis is set to SNAP. This means a change of direction instantly sets the axis to 0.

Viewing all articles
Browse latest Browse all 10

Trending Articles



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