5
$\begingroup$

I am trying to make a walking animation for my character in BGE, but I can't figure out to duplicate or loop the animation. This is so I can than make the animation "loop end" when you hold down the up arrow to make the animation play.

$\endgroup$
3
$\begingroup$

Update:
If this answer seems out of place, the original question was "How do I Duplicate Keyframes?"


Probably the easiest way is to the Dope Sheet editor. There are several ways to get there:

  • Click the icon on the bottom left corner of the 3D view and select Dope Sheet

    enter image description here

  • Click on the dropdown that says Default on the Info bar, and select Animation. (Or press CtrlLeft Arrow twice)

    enter image description here

    This will take you to the Animation layout, with a 3D view, Graph editor, and Dope sheet.

From the Dope sheet or the Graph editor, select keyframes, and press ShiftD to duplicate.

Looping in the BGE:

Once you have an animation that ends where it starts, you can make it loop in the Game Engine with Logic Bricks:

  1. Go to the Game logic editor (CtrlRight Arrow)

  2. Add a Keyboard Sensor (Add sensor > keyboard) and set the key by pressing the button next to the word Key.

  3. Add an Action actuator (Add actuator > Action) and set the Action value to your walk animation, set the end value to the last frame of your animation, and set the Action playback type to Loop End.

  4. Connect the logic bricks by dragging the dot next to the Sensor to the dot next to the Actuator. An And Controller should be automatically created between them:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.