Game Development Reference
In-Depth Information
Control and change the animation if it is back on the ground, as shown in the
following code:
protected void controlUpdate(float tpf) {
if(inAir){
BetterCharacterControl charControl
=spatial.getControl(BetterCharacterControl.class);
if(charControl != null &&
charControl.isOnGround()){
setAnimation(Animation.Idle);
jumpStarted = false;
inAir = false;
}
}
}
Search WWH ::




Custom Search