Max/min value number?


So I use my own function to accelerate my character, but there is no way to set a max value for the acceleration, right now the acceleration continues endlessly.

When I use the filter function, whenever the set value is reached, the function sends no more values because the criteria is not met. But basically I need a functuon where the max set value is held when it’s reached.

Is there a workaround?

Thanks :clap:


Can you send a screenshot of the code you’re using?

So from your other Help Request I believe you’re using Impulse now, is that correct?

If it’s something like player movement I would use Velocity instead. Velocity sets the speed of the character so it can be jarring, but that can be fixed.

Using the Ease behavior you can reach the set speed over 0.5 seconds or something like that and it makes it much smoother.

1 Like

The problem I have with the ease function is no matter how fast my character is, the deceleration is the same which I don’t like. The faster my character is, the longer the deceleration has to be imo.

1 Like

Ah ok. There is a “Time” input on ease, so you could create an expression to adjust the time to ease.

So something like


Just something like that, with A equaling Speed. Not that exact equation, but whatever feels best for it

But then there is the problem when I cancel the change in direction, with the ease function I have to wait until it’s executed, isn’t it?

I thought about the repeat function, repeating the button press every x seconds but I couldn’t find a function to set the delay in seconds.

Tbh I think a max/min speed for velocity push motor etc I needed, isn’t it?