Extremely newbie question regarding animations

Hi, I am new to the forums. I have encountered an odd problem with my work. The problem is that I can’t get my animation to walk as if on a treadmill. Whenever the animation loops his position changes drastically. I am assuming this has to do with my animation and not the panda syntax. The animation controls are definitely straight forward for the most part. I have tried countless things.

The question is: How can I make it so that the animation does NOT move it’s position every time it loops? I really want it to move the same way the basic panda-walk does.

I used a model I had found online. This is for basic function testing. I basically just want to get to know Panda. A premade character (without animations) allows me to quickly understand and therefore work more efficiently.

Any help whatsoever would be GREATLY appreciated.

If it is helpful to put some info attached:

import direct.directbase.DirectStart

from pandac.PandaModules import *
from direct.task import Task
from direct.actor import Actor
from direct.interval.IntervalGlobal import *
from direct.showbase.DirectObject import DirectObject
import random, sys, os, math
        
        
        
def SpinCameraTask(task):
  angledegrees = task.time * 15.0
  angleradians = angledegrees * (math.pi / 180.0)
  base.camera.setPos(20*math.sin(angleradians),-20.0*math.cos(angleradians),3)
  base.camera.setHpr(angledegrees, 0, 0)
  return Task.cont

taskMgr.add(SpinCameraTask, "SpinCameraTask")


environ = loader.loadModel("models/environment")
environ.reparentTo(render)    
environ.setScale(0.25,0.25,0.25) 
environ.setPos(-8,42,0)
    
Bill = Actor.Actor("Models/Animations/ATM/Bill/BillBoth",
                         {"Walk":"Models/Animations/ATM/Bill/BillBoth",
                          "Run" : "Models/Animations/ATM/Bill/Bill_Running_Animation"})  
Bill.setScale(0.009)
Bill.reparentTo(render)
Bill.loop("Walk")

run()

This is what the animation looks like in Max:
http://smg.photobucket.com/albums/v674/Onikura/?action=view&current=Walk.flv

You need to manually adjust your models keyframes in max so that he walks in the same spot and doesn’t move forward on the Y-axis (or whatever axis he’s walking on). From the looks of it it seems you’re using a readymade animation or maybe the biped footstep system: those automatically make it so that he changes his location.

Sounds like this is more of a Max question than a Panda question. You need to find out how to use Max to remove the forward animation from this character.

Actually, you need more than that. You need a walk cycle, but this animation doesn’t look like it’s built to cycle. If it were, the character would end up in exactly the same pose he started.

If it’s beyond your experience and ability to construct a new walk cycle for this character (it would certainly be beyond mine), you might need to look for a different character that already has one built for him.

David

I appreciate all of the replies. I understand what you guys mean. I have edited it, in the past, to walk like on a treadmill but I need to smooth the animation so that it loops perfectly. That isn’t too much of a problem, but all I need was a direction and that was perfect. Thanks so much for your guys help. :slight_smile: