Quantcast
Channel: Latest Questions by Shiro_Rin
Viewing all articles
Browse latest Browse all 50

Input.GetAxis wont work with UI controls

$
0
0
// Normal Movements Variables public float Speed; void FixedUpdate() { // Move senteces GetComponent().velocity = new Vector2(Mathf.Lerp(0, Input.GetAxis("Horizontal")* Speed, 0.8f), Mathf.Lerp(0, Input.GetAxis("Vertical")* Speed, 0.8f)); } } Now this works great on my keyboard for what I need.....However....I'm trying to port my game to mobile and it's not working. No matter what kind of UI controls I give, it wont work. I figured the crossplatforminput would work, but it doesn't. I'm using the Joystick.cs file that comes with unity.

Viewing all articles
Browse latest Browse all 50

Trending Articles



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