Quantcast
Channel: Questions in topic: "keyboard"
Viewing all articles
Browse latest Browse all 605

Unity input system only triggers once

$
0
0
Hi there, I recently started work on a platformer, and wanted to use the new Unity input system. Unfortunately, after setting it up, any input only triggers once, and *holding* down on buttons or keys does not register. It all worked with the old input system, but for some reason when I *hold* down a key, this is the result: ![alt text][2] Ideally, as I hold down a key, the character would continue to move instead of just move a little. ---------- As you can see, I have everything set up properly: ![alt text][1] I am not using any interactions, and I am on Unity 2019.4.14 LTS. ---------- Here is my code: // Move public void OnMove(InputAction.CallbackContext in_context) { // Apply horizontal movement float temp_movementDirection = in_context.ReadValue(); rigidBody2D.velocity = new Vector2(temp_movementDirection * speed, rigidBody2D.velocity.y); } ---------- Any help would be awesome! [1]: /storage/temp/170910-playerinput.png [2]: /storage/temp/170911-xsqcotese2.gif

Viewing all articles
Browse latest Browse all 605

Trending Articles



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