1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Allow the LUA API to set animations to meshes as well as the animation speed. Also update animations only when needed.

Support for animation blending, though for some reason it doesn't work.

Don't enable animation transitions by default for many reaosons

Object property to store individual bone positions. LUA can specify a bone name followed by a bone position. No functionality yet. Bone rotation to be added in the following commit

Same system for bone rotation, plus a few other things I missed
This commit is contained in:
MirceaKitsune 2012-10-25 23:29:07 +03:00 committed by Perttu Ahola
parent 9c8ba42750
commit fb0c431864
5 changed files with 128 additions and 4 deletions

View file

@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <string>
#include "irrlichttypes_bloated.h"
#include <iostream>
#include <map>
struct ObjectProperties
{
@ -33,6 +34,11 @@ struct ObjectProperties
core::aabbox3d<f32> collisionbox;
std::string visual;
std::string mesh;
core::vector2d<int> animation_frames;
float animation_speed;
float animation_blend;
std::map<std::string, v3f> animation_bone_position;
std::map<std::string, v3f> animation_bone_rotation;
v2f visual_size;
core::array<std::string> textures;
v2s16 spritediv;
@ -41,6 +47,7 @@ struct ObjectProperties
bool makes_footstep_sound;
float automatic_rotate;
ObjectProperties();
std::string dump();
void serialize(std::ostream &os) const;