- Home /
Question by
rlopesb36 · Apr 21 at 10:23 PM ·
wheelcollider
wheel collider steering in new input management, wheel collider steering in new input management
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<float>();
wheels[0].steerAngle = currentangle;
wheels[1].steerAngle = currentangle;
}
steering.png
(20.1 kB)
Comment
Your answer
Follow this Question
Related Questions
When I use WheelColliders, my car drifts to the left. Why? 3 Answers
Applying Torque to wheelcollider 1 Answer
Why Wheel Collider Not Following Tires Shape 0 Answers
unity 5 wheel collider problem 3 Answers