#Hi i need help with walk animation

43 messages ยท Page 1 of 1 (latest)

sterile geyser
#

how i can record and show you my problem my animation

untold spire
sterile geyser
#

okqy tell me if the

#

video works

untold spire
#

yup

sterile geyser
#

soo i dont know how to solve that animation problem

untold spire
#

you didn't say what's the problem or ask a question tho

sterile geyser
#

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();
      }
    }
untold spire
#

is the movement of the model baked into the keyframe animation or is the animation "in place" ?

sterile geyser
#

the animation is in place but the movement is baked abruptelly

untold spire
#

I don't understand

#

the movement is baked abruptelly
wdym

sterile geyser
#

soo you are walking and then the next movement is keep walking but the animation return as if he start walking

untold spire
#

when you open the model / animation / armature in Blender

#

and play the animation there

#

does the model walk in place?

sterile geyser
#

no the model move

#

i have two walk animation one walk in place and onther walk and move

untold spire
sterile geyser
#

A

untold spire
#

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

sterile geyser
#

but is a small animation is jsut for a frontend webpage

untold spire
#

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)

sterile geyser
untold spire
#

just select one for walking / running, and tick "in place" checkbox

sterile geyser
#

yes is workinh

#

๐Ÿ˜’

#

yes is working

#

so the animation A when i use the animation A instead of B

untold spire
#

you want B variant ๐Ÿ˜…

sterile geyser
#

no no is okay like that

#

but just for knowledge when you use animation A instead of B?

untold spire
#

never ๐Ÿ˜…

#

in scripted scenarios and cutscenes, if you have to

#

but coordinating keyframe position and code position is just unnecessarily complicating things