AtomicExamples icon indicating copy to clipboard operation
AtomicExamples copied to clipboard

Character animation examples request

Open Type1J opened this issue 10 years ago • 1 comments

The CharacterAnimation2D and CharacterAnimation3D would be far more helpful if they demonstrated not just how to play animations, but how to tween into them (maybe only if a checkbox is checked).

In other words, the character in a game is never going to just go from idle to walk. Instead, the character will interpolate between the idle and the walk animation over some duration. The examples should show that sort of usage, since it's more likely that that's what is desired.

Type1J avatar Jan 15 '16 04:01 Type1J

This is a good idea and when there is a more complicated rig, it would be good to also show blending multiple animations, etc.

It is easy to interpolate animations by providing a fade time, this is the 4th parameter to playExclusive, which is set to 0 in these examples by default:

https://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/Source/Atomic/Atomic3D/AnimationController.h#L104

However, in Roboman3D he does interpolate between over a 1/10th of a second:

https://github.com/AtomicGameEngine/AtomicExamples/blob/master/RoboMan3D/Resources/Components/RoboMan.js#L42

I have to look into the CharacterAnimation2D, though updating the CharacterAnimation3D to at least have the interpolation should be done, as it is trivial and will improve the example.

  • Josh

JoshEngebretson avatar Jan 15 '16 16:01 JoshEngebretson