THREE.js Character Animation Class

My ideas turned into topics
Post Reply
User avatar
Administrator
Site Admin
Posts: 1747
Joined: Thu Mar 22, 2018 10:19 am

THREE.js Character Animation Class

Post by Administrator » Sat Aug 29, 2020 4:08 am

When thinking about the creation of a game character using 3d models in THREE.js. I believe the best way to think of a character is as a class like any other oop program. A game character should interact with the environment and other characters. This should be achieved using predefined functions to accomplish an action. there should be classifications of actions, but rotation has no meaning. All these actions must be contained in a single animation using timeline skipping and looping if required.For instance an idle state and an sitting idle state. the problem is how do we smoothly animate from sitting to walking. i can not just jump the timeline, i would need to merge the animation by running other animations or a bridge animation for a smooth transition. A bridge animation must covert the current state of the model to a common state which is compatible with the target animation. The bridge animation must directly tween the current state to the common state very quickly and then the target animation can run efficiently, This can be done because we know all of the states of the model and all of the states of the common destination, then run a tween between these. This will give the character a very smooth transition.

Notes: some animations might not transition very well and should probably run there course. this will reduce the responsiveness.

Post Reply