Started by
edgardeivis
on
Topic category: Help with MCreator software
how to do i use y and x velocity to detect movement or jumps?
it doens't work for me, i want it to be activated at all times
Edited by edgardeivis on Wed, 06/03/2020 - 16:09
You could use velocity to detect movement, but I would suggest just checking if the keybind is down.
Here is the method,
There are some other methods, i.e isKeyDown(). So configure accordingly.
To directly answer your question;
Use something like this,
And for this;
This is why I would rather use my first method. To keep checking you are going to need to put this in a tick method. But if you are to check for velocity, you are going to "run" your procedure many times (if that is what you want go ahead).
Although, if you check for the keybinding being pressed, then you (theoretically) should run the procedure once.