With the recent release of Basic Modeler v1.4.0
, we now have basic syntax to define some basic animations for our models.
There are currently two supported animation commands, which are rotate
In the manner that variables are defined by using a $ symbol, animations are defined using the @ symbol.
So suppose we have an object, we will call it an arm, assigned to the $arm variable, and we want to rotate it on the X axis.
We can make a new animation called armswing, and define it like so:
@armswing > rotateX($arm, 4, 0, 50);
What does this all mean? In the rotateX function (rotate object on X axis), the first argument is the variable storing the object we wish to rotate. The second argument is the speed at which we rotate. All arguments are stops in the animation in degrees, so in this instance, the arm will rotate from 0 to 50 degrees and back.
You can use rotateX, rotateY or rotateZ functions. There are also position functions of the same that use the same arguments, except they move the object rather than rotate it. These can all be chained together in a single animation as well.
It all sounds confusing, so I have attached a basic model file, a blockhead token that demonstrates the various animations and chains them together.
Animation support was the last step needed for being able to utilize Basic Models in games, so I'm glad to finally have it in there and ready to go!