MyCharacterController::MyCharacterController(MyAvatar* avatar) {
    _halfHeight = 1.0f;

    assert(avatar);
    _avatar = avatar;

    _enabled = false;

    _floorDistance = MAX_FALL_HEIGHT;

    _walkVelocity.setValue(0.0f, 0.0f, 0.0f);
    _hmdVelocity.setValue(0.0f, 0.0f, 0.0f);
    _jumpSpeed = JUMP_SPEED;
    _isOnGround = false;
    _isJumping = false;
    _isFalling = false;
    _isHovering = true;
    _isPushingUp = false;
    _jumpToHoverStart = 0;
    _lastStepDuration = 0.0f;

    _pendingFlags = PENDING_FLAG_UPDATE_SHAPE;
    updateShapeIfNecessary();
}
DynamicCharacterController::DynamicCharacterController(AvatarData* avatarData) {
    _halfHeight = 1.0f;
    _shape = nullptr;
    _rigidBody = nullptr;

    assert(avatarData);
    _avatarData = avatarData;

    _enabled = false;

    _floorDistance = MAX_FALL_HEIGHT;

    _walkVelocity.setValue(0.0f,0.0f,0.0f);
    _jumpSpeed = JUMP_SPEED;
    _isOnGround = false;
    _isJumping = false;
    _isFalling = false;
    _isHovering = true;
    _isPushingUp = false;
    _jumpToHoverStart = 0;

    _pendingFlags = PENDING_FLAG_UPDATE_SHAPE;
    updateShapeIfNecessary();
}