jbills
jbills

Reputation: 694

Animating a model made of cubes in opengl

I am attempting to animate a model similar to the ones here: http://wollay.blogspot.com/2012/09/new-cube-world-video.html. It is made up of cubes, and divided into several parts: the head, body, arms and legs. I have no experience with animation. How would I create a walking animation similar to the ones seen in that video using opengl?

Upvotes: 1

Views: 739

Answers (1)

Jesus Ramos
Jesus Ramos

Reputation: 23266

If you want to do "simple" animation (like very rigid). You can simply just rotate the legs and arms about the connection point to the body over time by simply varying the speed of movement. For instance in your timer function or idle function you check how much time has elapsed and set the rotation of the part to some number based on that until a certain point where it swings back the other way of course in an arc.

If you want more complicated things you are better off animating and creating the models in a 3d modeling tool that allows you to create animations as well. Trying to program more complicated animations may be difficult.

For starters you can always just do the simple rigid swing animations and maybe try to add some more movement programatically such as some side to side sway of arms which is simple if you already did the back and forth swinging and some basic idle animations.

Upvotes: 1

Related Questions