3D Animation & Phyiscs Update
Pre-releaseIntroducing a new GameElement called Model, which currently supports models with animations. For static models without animations, continue using the old Element3D.
So, what can you do with this model? Simply put, you can play animations with this Element. Within the model, there is a property called Animator which also has some basic options like Play. If this value is set to false, no animation will be played. Loop is another option; if set to true, the animation will play in a loop. Both of these values are set to true by default.
You can change the animation using the PlayAnimation function within the Model class. The parameter is the name of the animation you want to play.
Adding the Model to your scene is done the same way as with other GameElements:
var model = new Model("Vampire", new Vec3(-1f, -1f, -1f), modelspath + "\\Vampire\\vampire.dae");
model.AnimationSpeed = 0.02f;
model.Size = new Vec3(0.7f);
model.PlayAnimation("Armature|idle");
baseScene.AddGameElement("BaseLayer", model);
The file formats currently tested are .FBX and .DAE. Please note that this is currently in beta, and some features might not work as expected. In such cases, feel free to post your concerns on Discord and I will look into them!