Quantcast
Channel: Questions in topic: "wheelcollider"
Viewing all articles
Browse latest Browse all 490

wheel collider steering in new input management, wheel collider steering in new input management

$
0
0
I'm trying to use the new 3D drive input system for my car's movement, more specifically the steering angle. when i use Input.GetAxis("Horizontal") my wheel goes smoothly from 0 to 30 and as i press keys. when i use context.ReadValue() it jumps from 0 to 30 with a click and returns to 0 when released without being smooth. I can't get the wheel to rotate at the angle according to the key press and come back smoothly like in the old system, can anyone help me? gif turn: https://s10.gifyu.com/images/create-gif.gif Inputmanage input; public float currentangle = 0f; public float angle = 30f; public void Onmovement(InputAction.CallbackContext context) { currentangle = angle * context.ReadValue(); wheels[0].steerAngle = currentangle; wheels[1].steerAngle = currentangle; } ![alt text][1] [1]: /storage/temp/195333-steering.png

Viewing all articles
Browse latest Browse all 490

Trending Articles



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