Example #1
0
        private void MoveForward(float axisValue)
        {
            if (Controller != null && axisValue != 0.0f)
            {
                // find out which way is forward
                Rotator rotation    = GetControlRotation();
                Rotator yawRotation = new Rotator(0f, rotation.Yaw, 0f);
                Vector3 direction   = rotation.GetForwardVector();

                // add movement in that direction
                AddMovementInput(direction, axisValue);
            }
        }