Hey guys³
run animation while W and SHIFT pressed at the same time
I want to call the runRange animation of the character, when W and SHIFT are being pressed at the same time.
I already tried
In line 101 I already tried
if (inputMap["w"] && inputMap["Shift"]) {
scene.beginAnimation(skeleton, runRange.from, runRange.to, true);
}
and
if (inputMap["Shift"])
in the if (inputMap["w"])
statement, but nothing seems to work to get the run-animation animated.
idle animation when no key is pressed
Also I want to run the idle animation, when no key is pressed.
I thought it would be a good idea if I call the animation in line 116 after every other animation is stopped. But you can guess it - it didn’t work and I’m out of ideas.
Example:
https://www.babylonjs-playground.com/#BCU1XR#323
Like in my two other threads today I hope you can give me some ideas.
Thank you in advance!