Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bolt : using getAxis to output slow acceleration.

Discussion in 'Visual Scripting' started by Metaclay, Apr 22, 2021.

  1. Metaclay

    Metaclay

    Joined:
    Sep 28, 2019
    Posts:
    11
    Hi, i'm using Bolt. So i want to use getAxis() and i want to capture the 'w' press. It works but the acceleration is too fast. I want to make the acceleration lot slower.

    This is what i want to achieve (at time 6:10 to 6:25) :
    .The code is at the same video at time 6:00 . That codes works perfectly fine. And this is all i want to achieve but i want to do it in Bolt (visual scripting) rather than manual scripting.

    So that line of code at 6:00 on that video : Velocity = time.Deltatime * acceleration

    That code is controlling how fast or slow the acceleration can go from 0 to 1 when pressing ‘w’ key. But in Bolt, i use ‘getAxis’ and by using default sensitivity setting, if i press “w” it will take less than half a second for the acceleration to go from 0 to 1. I want to make it slower so i can go from 0 to 1 in 3 seconds or 5 seconds.
    In fact , this the same as setting up the sensitivity in input manager to low value, but i want to keep this setting as default and want to control it inside bolt.

    What is the correct workflow in bolt ?


     

    Attached Files:

    Last edited: Apr 22, 2021
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    1,106
    The workflow is identical; you get Vertical axis and multiply that with time.deltaTime. Then set the velocity float with the result of the multiply node.
     
  3. Metaclay

    Metaclay

    Joined:
    Sep 28, 2019
    Posts:
    11
    Hi, yes that's what i'm trying to do but none of them is working. I uploaded new video to show my bolt setup.

    when pressing and hold 'w', after half a second, the output of getaxis is already saturated or clamped at 1. so no matter i multiply it with, after that first half a second, that value just doesn't increase anymore.

    I want that blend time to be slower, so it will reach running state after for example 3 or 5 seconds.

    Can you tell me what i did wrong ?
     
  4. ericb_unity

    ericb_unity

    Unity Technologies

    Joined:
    Nov 24, 2017
    Posts:
    167
    You have many options. One of those is with the Input Manager it work fine when you use a controller with buttons and want to force a progression on something that is true or false.

    In the project settings -> Input manager:

    - Sensitivity: Will change the speed to go from current value to 1 or -1.
    - Gravity: Will change the speed to go from current value to 0. Setting 0.5 will make it take more than a second.


    upload_2021-4-22_13-18-42.png