How to do an advanced jump animation with SAGE?

How to do an advanced jump animation with SAGE?

PostPosted by Deckard » Wed Oct 17, 2012 5:46 am

I am new to the Sage library and although I closely watched the tutorial and read the Sage documentation, I have been unable to setup the Sage library to create an advanced jumping animation form my game which I would like to work as follows:

- the jump animation is divided in four sub states:
- prejump: the character is still on the ground and bending his knees to prepare for the jump,
- jump: the character actually jumps. This is when the CharacterController is moved upward and loses contact with the ground,
- fall: at some point the character starts to fall downward due to the gravity. This is a cycling animation because we do not know for how long the character will fall, if he jumps from a ledge for example,
- land: the character touches the ground and is reacting to the impact by bending his knees.

- the prejump, jump, fall and land animations are different depending on the speed of the character. There are:
- IdlePrejump, IdleJump, IdleFall, IdleLand: they are used when the character jumps while in Idle state,
- WalkPrejump, WalkJumpRight, WalkJumpLeft, WalkFallRight, WalkFallLeft, WalkLand: they are used when the character jumps while walking,
- RunPrejump, RunJumpRight, RunJumpLeft, RunFallRight, RunFallLeft, RunLand: they are used when the character jumps while running.

- the walk jump and run jump have separate animations depending on which foot the character is when the player presses the jump button.

- WalkPrejump, WalkLand, RunPrejump and RunLand are cycling animations (in fact they are locomotion groups). So it is necessary to be able to select the right frame by code, depending on which foot the character is when the player presses the jump button.

Is there a way to make this work with the Sage library? It seems to me that some additional functionalities would be required like:
- the possibility to set the frame of an animation before transitioning to it.
- the possibility to start transitioning to a new state after a given time delay
- the possibility to send a message to another component, like the CharacterMotor for example.

Anyhelp will be greatly appreciated =)
Deckard
 
Posts: 3
Joined: Sun Oct 14, 2012 10:19 am

Re: How to do an advanced jump animation with SAGE?

PostPosted by AlteredReality » Sat Oct 20, 2012 7:35 pm

It does sound like you have quite an advanced jump setup. :-)

Honestly, it sounds like for what you want that you would require some external functionality at least. You would need to trigger state transitions for when they leave the ground and hit the ground.

For the idle, walk, and run jump state machines I see two ways it could be handled.

One is to have an OnGround, StartJump, InAir and Landing blend graphs. Those blend graphs would have to blend between the various movement states such as Idle, Walk, and Run.

Second would be to have nested state machines for Idle, Walk, and Run. And each would have its own states for jumping

I think the first would work best though, but it would definately require some experimentation.

Unfortunately, there is no way to start an animation at a specific frame.

Let me know if this helps, or if you have any other questions at all.
Andy - Altered Reality
AlteredReality
Site Admin
 
Posts: 118
Joined: Fri Jan 06, 2012 8:31 pm


Return to Questions and Discussion

Who is online

Users browsing this forum: No registered users and 0 guests


Style by Gokinstudio | Free forum hosting by ProphpBB | Software by phpBB | Report Abuse | Privacy
cron