#Hi i need help with walk animation
43 messages ยท Page 1 of 1 (latest)
you can try replicating the scene on https://codepen.io/
feel free to use https://codepen.io/mjurczyk/pen/bGmGaBr as a starting template
yup
you didn't say what's the problem or ask a question tho
that the animation is return inveratively and i dont know where to go to three.js to smooth the animation when is walking
class WalkState extends State {
constructor(parent) {
super(parent);
}
get Name() {
return 'walk';
}
Enter(prevState) {
const curAction = this._parent._proxy._animations['walk'].action;
if (prevState) {
const prevAction = this._parent._proxy._animations[prevState.Name].action;
curAction.enabled = true;
if (prevState.Name == 'run') {
const ratio = curAction.getClip().duration / prevAction.getClip().duration;
curAction.time = prevAction.time * ratio;
} else {
curAction.time = 0.0;
curAction.setEffectiveTimeScale(2.0);
curAction.setEffectiveWeight(1.0);
}
curAction.crossFadeFrom(prevAction, 0.5 , true);
curAction.play();
} else {
curAction.play();
}
}
is the movement of the model baked into the keyframe animation or is the animation "in place" ?
the animation is in place but the movement is baked abruptelly
soo you are walking and then the next movement is keep walking but the animation return as if he start walking
when you open the model / animation / armature in Blender
and play the animation there
does the model walk in place?
no the model move
i have two walk animation one walk in place and onther walk and move
A
then, unless you like pain, you want to adjust your animations to be B ๐
model shouldn't be moving in animations, otherwise smooth blending and movement is almost impossible
but is a small animation is jsut for a frontend webpage
doesn't change the fact that the small animation is going to be jumpy, unless it doesn't reposition the model
(I mean, your alternative to fixing the animation is to listen to last frame in every loop and move model by deltaTime * -positionOffsetInTheAnimation - and that's not going to be fun)
https://www.mixamo.com/ - takes literally 5 minutes to fix the animations
just select one for walking / running, and tick "in place" checkbox
yes is workinh
๐
yes is working
so the animation A when i use the animation A instead of B
you want B variant ๐