Search Unity

About finding values of Input.GetAxis in Debugging - -

Discussion in 'Getting Started' started by jbb1979, Aug 10, 2019.

  1. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    306
    Hi,

    I'm trying to use Input.GetAxis to control a rolling ball, in a nice tutorial ( Thank you so much

    But, I would like to output the game-time value of that thing - -

    I've added a Debug.Log(SideAxisVariable); line and, it says the value of the GetAxis moves between -1, 0 and 1, when I press WSAD horizontal keys . .

    So, sometimes the value is 0.43535, sometimes 0.684982 but, during long-term press, over one second, it becomes fixed at 1 ..

    I realize having a smooth transition from zero input to button press is nice but, is there a way to get completely either 0, -1 or, +1 value ? So, there's no input delay as the Input.GetAxis goes from 0 to 1 value
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    4,562
    jbb1979 and Peter77 like this.
  3. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    306
    Omg omg, You genius . .
     
  4. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    306
    Okay, this is god-damn awesome, I say - - I have a white ball, it rolls around because I've made a physics script and, I've added a terrain and, my textures of going to Hell are now there . . This little ball is literally going to Hell . .. It's so Awesome, thanks for Great engine ! ! I have also learnt from other tutorial, I added package ' Cinemachine ' and, attached a Virtual camera to it, using the steps in John Lemon tutorial - - this is super-fun, as I can see my progress directly on screen ! ! Thanks

    Now, in the script there was added a Rigidbody and, we wrote like ' AddForce ', like RigidBody.AddForce(Vector3 = GetAxisRaw("Horizontal"), 0.0f, GetAxisRaw("Vertical"); . . So, I make it move by adding a force . .

    Right now, I'm so happy, I'll start making a bit of the Game world today, so the ball has some places to go to - -

    Thank you, for all your advice and, help - - Unity rocks ! ! <3
     
  5. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    306
    Omg Check my Insane Progress - -<3
    Hell Ball X Xx x.jpg

    Hell Ball X X.jpg Hell Ball X Xx.jpg
     
  6. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    306
    It's so cool, for a part of my game I want the Main character to go to Hell and, see it . . I've made the volcanic gravel floor, the way it should look, in Quixel - - It took 5 minutes and, I have diffuse and, normal map, so, I can paint terrain - -

    Today, I will use all my efforts to create a rock, that looks good, so the Ball can go to hell And, have a Good time - --

    I think I was using the program wrong, since I was using the coding, from the start, like all those things should be drag and drop components and, Coding is Only for emergencies - - I was Wrong - -$
     
  7. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    306
    I hope this is alright, I'm so excited, I want to make a game where the main character at times go to Hell, to learn from Hell, To be Better - - He sees torture and, Even meets the Devil, I've made some concept art . .. The Reason he must go there, is to learn the Truth behind the world, that the Devil and, Heaven exists and, He will see things there, like in a vision and, talk to a few sinners, that are being tortured, by the Demons - - So, he can learn why they ended there, like in story, called Divine Comedy, by Dante Alighieri, from 1400th century, that ' Devil may cry ' and, ' Dante's Inferno ' Games are based on - -

    The main character goes there, because God gives him an offer, that he can visit Hell and, Write an account of what he sees, for other people to take heed And, Avoid Hell - - It will be a Stealth-horror game, where the main character, when he wakes up in Hell, in his dreams, must avoid Devils and, Some-how survive to tell the Crazy tale - - So, to-day I will make a nice rock, that my Ball can roll over And, Look at - - Thank you, YOU ROCK ! !
     
  8. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    306
    Unity is So good, I'm excited - -$