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.
-
$\begingroup$ have a look at this post: blender.stackexchange.com/questions/1860/… $\endgroup$– gandalf3Commented Aug 27, 2013 at 21:58
-
$\begingroup$ Also see: How may I create a continuously looping animation? $\endgroup$– AldrikCommented Aug 27, 2013 at 22:04
1 Answer
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
Click on the dropdown that says Default on the Info bar, and select Animation. (Or press CtrlLeft Arrow twice)
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:
Go to the Game logic editor (CtrlRight Arrow)
Add a Keyboard Sensor (Add sensor > keyboard) and set the key by pressing the button next to the word Key.
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.
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: