Search Unity

Normalizing steering wheel Inputs

Discussion in 'Scripting' started by NDSno1, Feb 16, 2018.

  1. NDSno1

    NDSno1

    Joined:
    Dec 20, 2014
    Posts:
    223
    Hi all,
    So I'm trying to implement inputs from the Logitech G29 Steering Wheel for my racing game. I downloaded the Logitech SDK and played around with it and got stuck at pedals inputs.
    The steering wheel's 1 pedal axis goes from -32000 (fully pressed) to 32000, but I need an input that goes from 0 to 1, can somebody help me with normalizing the input?
     
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Sure.. input / 64000 + .5f
     
    NDSno1 likes this.
  3. NDSno1

    NDSno1

    Joined:
    Dec 20, 2014
    Posts:
    223
    Thank you it's working now