public override Vector3 ProcessMovement(Vector3 input)
 {
     MotorHelper.KillVector(ref input, machine.WallVector);
     MotorHelper.ApplySpeed(ref input, machine.speed);
     MotorHelper.ApplyGravity(ref input, ref currentFallingSpeed, machine.Gravity, terminalVelocity);
     return(input);
 }
 // Used in combat to create a target Vector from input at a given speed.
 private Vector3 ProcessStep(Vector3 input, float stepSpeed)
 {
     VerticalVelocity = 0;
     MotorHelper.KillVector(ref input, WallVector);
     MotorHelper.FollowVector(ref input, SlopeNormal);
     MotorHelper.ApplySpeed(ref input, stepSpeed);
     return(input);
 }
 public Vector3 ProcessFall(Vector3 input)
 {
     MotorHelper.KillVector(ref input, WallVector);
     MotorHelper.ApplySpeed(ref input, Speed);
     MotorHelper.ApplyGravity(ref input, ref VerticalVelocity, Gravity, TerminalVelocity);
     // Influence Air Velocity function not written currently
     return(input);
 }
Exemple #4
0
    public override Vector3 ProcessMovement(Vector3 input)
    {
        MotorHelper.KillVector(ref input, machine.WallVector);
        MotorHelper.ApplySpeed(ref input, machine.speed);
        input.Set(0, currentJumpForce, input.z);
        currentJumpForce -= (machine.Gravity * Time.deltaTime);

        return(base.ProcessMovement(input));
    }
    public override Vector3 ProcessMovement(Vector3 input)
    {
        float speed = MainManager.Get.settings.data.playerSpeed;

        input.Set(0, 0, input.z);
        currentSpeed = Mathf.Min(currentSpeed + 1, speed);
        MotorHelper.FollowVector(ref input, machine.SlopeNormal);
        MotorHelper.KillVector(ref input, machine.WallVector);
        MotorHelper.ApplySpeed(ref input, currentSpeed);
        return(input);
    }