This commit is contained in:
2025-09-16 20:38:29 +03:00
parent 1aa002d8ba
commit 190318e5c4
20 changed files with 925 additions and 243 deletions

View File

@@ -16,6 +16,11 @@ struct CharacterBase {
Ogre::Node *mRootBone;
Ogre::Vector3 mBoneMotion;
Ogre::Vector3 mGoalDirection; // actual intended direction in world-space
bool is_submerged;
};
struct CharacterLocation {
Ogre::Quaternion orientation;
Ogre::Vector3 position;
};
struct CharacterBody {
btPairCachingGhostObject *mGhostObject;
@@ -33,6 +38,8 @@ struct AnimationControl {
ANIM_IDLE = 0,
ANIM_WALK,
ANIM_RUN,
ANIM_TREADING_WATER,
ANIM_SWIMMING,
NUM_ANIMS,
ANIM_NONE = NUM_ANIMS
};
@@ -48,7 +55,6 @@ struct AnimationControl {
Ogre::NodeAnimationTrack *mRootTracks[NUM_ANIMS];
};
struct CharacterModule {
flecs::entity player;
CharacterModule(flecs::world &ecs);
void setAnimation(AnimationControl &anim);
void fadeAnimations(AnimationControl &anim, Ogre::Real deltaTime);