// break;
}
}
protected void stepDown(CollisionWorld collisionWorld, float dt) {
Transform start = Stack.alloc(Transform.class);
Transform end = Stack.alloc(Transform.class);
// phase 3: down
// float additionalDownStep = (wasOnGround /*&& !onGround()*/) ? stepHeight : 0.0f;
// Vector3f step_drop = Stack.alloc(Vector3f.class);
// step_drop.scale(currentStepOffset + additionalDownStep, upAxisDirection[upAxis]);
// float downVelocity = (additionalDownStep == 0.0f && verticalVelocity<0.0f?-verticalVelocity:0.0f) * dt;
// Vector3f gravity_drop = Stack.alloc(Vector3f.class);
// gravity_drop.scale(downVelocity, upAxisDirection[upAxis]);
// targetPosition.sub(step_drop);
// targetPosition.sub(gravity_drop);
float downVelocity = (verticalVelocity<0.0f?-verticalVelocity:0.0f) * dt;
if(downVelocity > 0.0 && downVelocity < stepHeight
&& (wasOnGround || !wasJumping))
{
downVelocity = stepHeight;
}
Vector3f step_drop = Stack.alloc(Vector3f.class);
step_drop.scale(currentStepOffset + downVelocity, upAxisDirection[upAxis]);
targetPosition.sub(step_drop);
start.setIdentity ();
end.setIdentity ();
start.origin.set(currentPosition);
end.origin.set(targetPosition);
KinematicClosestNotMeConvexResultCallback callback = new KinematicClosestNotMeConvexResultCallback(ghostObject, upAxisDirection[upAxis], maxSlopeCosine);