moved movement code to player
This commit is contained in:
@ -5,6 +5,14 @@ using Movementtests.systems;
|
||||
using Movementtests.player_controller.Scripts;
|
||||
using RustyOptions;
|
||||
|
||||
public enum JumpTypes
|
||||
{
|
||||
SimpleJump,
|
||||
DoubleJump,
|
||||
JumpFromDash,
|
||||
JumpFromWall
|
||||
}
|
||||
|
||||
public partial class PlayerController : CharacterBody3D
|
||||
{
|
||||
// User API to important child nodes.
|
||||
@ -16,9 +24,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
public MantleSystem MantleSystem;
|
||||
public DashSystem DashSystem;
|
||||
public CapsuleCollider CapsuleCollider;
|
||||
public Gravity Gravity;
|
||||
public HealthSystem HealthSystem;
|
||||
public MoveSystem MoveSystem;
|
||||
public TweenQueueSystem TweenQueueSystem;
|
||||
public Node3D WeaponRoot;
|
||||
public WeaponSystem WeaponSystem;
|
||||
@ -49,8 +55,40 @@ public partial class PlayerController : CharacterBody3D
|
||||
private Timer _dashCooldownTimer;
|
||||
private Timer _empowerTimeDownscale;
|
||||
|
||||
[ExportCategory("Movement")]
|
||||
[ExportGroup("Ground")]
|
||||
[Export(PropertyHint.Range, "0,20,0.1,or_greater")]
|
||||
public float WalkSpeed { get; set; } = 7.0f;
|
||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||
public float AccelerationSpeedFactorFloor = 5.0f;
|
||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||
public float DecelerationSpeedFactorFloor = 5.0f;
|
||||
[ExportGroup("Air")]
|
||||
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||
public float DecelerationSpeedFactorAir = 1.0f;
|
||||
[Export(PropertyHint.Range, "0,10,0.01,or_greater")]
|
||||
public float Weight { get; set; } = 3.0f;
|
||||
[ExportGroup("Jump")]
|
||||
[Export(PropertyHint.Range, "0,2,0.01,or_greater")]
|
||||
public float StartVelocity { get; set; } = 1.0f;
|
||||
[Export(PropertyHint.Range, "0.1,10,0.1,or_greater")]
|
||||
public float DoubleJumpSpeedFactor { get; set; } = 2f;
|
||||
[Export(PropertyHint.Range, "0.1,10,0.1,or_greater")]
|
||||
public float JumpFromDashSpeedFactor { get; set; } = 2f;
|
||||
[Export(PropertyHint.Range, "0.1,10,0.1,or_greater")]
|
||||
public float JumpFromWallSpeedFactor { get; set; } = 2f;
|
||||
[ExportGroup("WallHug")]
|
||||
[Export(PropertyHint.Range, "0.1,10,0.1,or_greater")]
|
||||
public float WallHugDownwardSpeed { get; set; } = 2f;
|
||||
[Export(PropertyHint.Range, "0.1,10,0.1,or_greater")]
|
||||
public float WallHugHorizontalDeceleration { get; set; } = 5f;
|
||||
|
||||
private float _targetSpeed;
|
||||
private float _gravity;
|
||||
|
||||
[ExportCategory("Other")]
|
||||
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
|
||||
public float TimeScaleAimInAir { get; set; } = 0.2f;
|
||||
public float TimeScaleAimInAir { get; set; } = 0.05f;
|
||||
[Export(PropertyHint.Range, "0,5,0.1,or_greater")]
|
||||
public float MaxJumpBoostAfterDashing { get; set; } = 1f;
|
||||
|
||||
@ -96,14 +134,13 @@ public partial class PlayerController : CharacterBody3D
|
||||
private StateChartState _powerFull;
|
||||
|
||||
private StateChartState _grounded;
|
||||
private StateChartState _crouched;
|
||||
private StateChartState _standing;
|
||||
private StateChartState _mantling;
|
||||
private StateChartState _movHanging;
|
||||
private StateChartState _airborne;
|
||||
private StateChartState _coyoteEnabled;
|
||||
private StateChartState _doubleJumpEnabled;
|
||||
private StateChartState _onWall;
|
||||
private StateChartState _onWallHugCanceled;
|
||||
private StateChartState _onWallHugging;
|
||||
private StateChartState _onWallHanging;
|
||||
private StateChartState _falling;
|
||||
@ -121,6 +158,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
DashCooldownIndicator = GetNode<ColorRect>("%DashCooldownIndicator");
|
||||
DashCooldownIndicator.Visible = false;
|
||||
EmpoweredActionsLeft = MaxNumberOfDashActions;
|
||||
_targetSpeed = WalkSpeed;
|
||||
|
||||
// Node3D mapNode = GetTree().Root.FindChild("Map", true, false) as Node3D;
|
||||
|
||||
@ -141,8 +179,6 @@ public partial class PlayerController : CharacterBody3D
|
||||
WeaponSystem = GetNode<WeaponSystem>("WeaponRoot/WeaponSystem");
|
||||
MantleSystem = GetNode<MantleSystem>("MantleSystem");
|
||||
CapsuleCollider = GetNode<CapsuleCollider>("CapsuleCollider");
|
||||
Gravity = GetNode<Gravity>("Gravity");
|
||||
MoveSystem = GetNode<MoveSystem>("MoveSystem");
|
||||
DashSystem = GetNode<DashSystem>("DashSystem");
|
||||
StairsSystem = GetNode<StairsSystem>("StairsSystem");
|
||||
WallHugSystem = GetNode<WallHugSystem>("WallHugSystem");
|
||||
@ -174,8 +210,6 @@ public partial class PlayerController : CharacterBody3D
|
||||
_powerFull = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/Full"));
|
||||
|
||||
_grounded = StateChartState.Of(GetNode("StateChart/Root/Movement/Grounded"));
|
||||
_standing = StateChartState.Of(GetNode("StateChart/Root/Movement/Grounded/Standing"));
|
||||
_crouched = StateChartState.Of(GetNode("StateChart/Root/Movement/Grounded/Crouched"));
|
||||
_mantling = StateChartState.Of(GetNode("StateChart/Root/Movement/Mantling"));
|
||||
_movHanging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hanging"));
|
||||
_airborne = StateChartState.Of(GetNode("StateChart/Root/Movement/Airborne"));
|
||||
@ -183,6 +217,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
_doubleJumpEnabled = StateChartState.Of(GetNode("StateChart/Root/Movement/Airborne/DoubleJumpEnabled"));
|
||||
_onWall = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall"));
|
||||
_onWallHugging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hugging"));
|
||||
_onWallHugCanceled = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/HugCanceled"));
|
||||
_onWallHanging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hanging"));
|
||||
_falling = StateChartState.Of(GetNode("StateChart/Root/Movement/Airborne/Falling"));
|
||||
// State timers
|
||||
@ -206,12 +241,8 @@ public partial class PlayerController : CharacterBody3D
|
||||
|
||||
// Movement stuff
|
||||
// Getting universal setting from GODOT editor to be in sync
|
||||
float gravitySetting = (float)ProjectSettings.GetSetting("physics/3d/default_gravity");
|
||||
Gravity.Init(gravitySetting);
|
||||
_gravity = (float)ProjectSettings.GetSetting("physics/3d/default_gravity");
|
||||
MantleSystem.Init(HeadSystem);
|
||||
var moveSystemParams = new MoveSystem.MoveSystemParameters(this, Gravity, MantleSystem, TweenQueueSystem,
|
||||
HeadSystem, CapsuleCollider);
|
||||
MoveSystem.Init(moveSystemParams);
|
||||
StairsSystem.Init(stairsBelowRayCast3D, stairsAheadRayCast3D, cameraSmooth);
|
||||
DashSystem.Init(HeadSystem, camera, TweenQueueSystem);
|
||||
WeaponSystem.Init(HeadSystem, camera);
|
||||
@ -220,7 +251,6 @@ public partial class PlayerController : CharacterBody3D
|
||||
// RPG Stuff
|
||||
HealthSystem.HealthSystemInitParams healthSystemParams = new HealthSystem.HealthSystemInitParams()
|
||||
{
|
||||
Gravity = Gravity,
|
||||
Parent = this,
|
||||
Camera = camera,
|
||||
Head = HeadSystem,
|
||||
@ -229,7 +259,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
BlurRect = blurRect,
|
||||
};
|
||||
HealthSystem.Init(healthSystemParams);
|
||||
Stamina.SetSpeeds(MoveSystem.WalkSpeed, MoveSystem.SprintSpeed);
|
||||
Stamina.SetSpeeds(WalkSpeed, WalkSpeed);
|
||||
|
||||
EmpoweredActionsLeft = MaxNumberOfDashActions;
|
||||
|
||||
@ -249,7 +279,9 @@ public partial class PlayerController : CharacterBody3D
|
||||
_grounded.StateEntered += OnGrounded;
|
||||
_grounded.StatePhysicsProcessing += HandleGrounded;
|
||||
_airborne.StatePhysicsProcessing += HandleAirborne;
|
||||
_onWallHugCanceled.StatePhysicsProcessing += HandleAirborne;
|
||||
_onWallHugging.StatePhysicsProcessing += HandleWallHugging;
|
||||
_onWallHanging.StatePhysicsProcessing += HandleWallHanging;
|
||||
|
||||
_coyoteEnabled.StateEntered += StartCoyoteTime;
|
||||
_coyoteTimer.Timeout += CoyoteExpired;
|
||||
@ -342,27 +374,30 @@ public partial class PlayerController : CharacterBody3D
|
||||
}
|
||||
public void OnInputJumpPressed()
|
||||
{
|
||||
if (MoveSystem.CanMantle())
|
||||
if (CanMantle())
|
||||
{
|
||||
Mantle();
|
||||
return;
|
||||
}
|
||||
|
||||
if (_grounded.Active || _coyoteEnabled.Active)
|
||||
if (_empowerOn.Active && CanPerformEmpoweredAction())
|
||||
{
|
||||
PerformEmpoweredAction();
|
||||
PerformJump(MoveSystem.JumpTypes.JumpFromDash);
|
||||
PerformJump(JumpTypes.JumpFromDash);
|
||||
_playerState.SendEvent("megajump");
|
||||
}
|
||||
else
|
||||
PerformJump(MoveSystem.JumpTypes.SimpleJump);
|
||||
PerformJump(JumpTypes.SimpleJump);
|
||||
else if (_doubleJumpEnabled.Active)
|
||||
if (_empowerOn.Active && CanPerformEmpoweredAction())
|
||||
{
|
||||
PerformEmpoweredAction();
|
||||
PerformJump(MoveSystem.JumpTypes.JumpFromDash);
|
||||
PerformJump(JumpTypes.JumpFromDash);
|
||||
_playerState.SendEvent("megajump");
|
||||
}
|
||||
else
|
||||
PerformJump(MoveSystem.JumpTypes.DoubleJump);
|
||||
PerformJump(JumpTypes.DoubleJump);
|
||||
else if (_onWall.Active)
|
||||
JumpFromWall(_empowerOn.Active);
|
||||
|
||||
@ -462,15 +497,17 @@ public partial class PlayerController : CharacterBody3D
|
||||
if (isEmpowered && CanPerformEmpoweredAction())
|
||||
{
|
||||
PerformEmpoweredAction();
|
||||
PerformJump(MoveSystem.JumpTypes.JumpFromDash, jumpDirection);
|
||||
PerformJump(JumpTypes.JumpFromDash, jumpDirection);
|
||||
return;
|
||||
}
|
||||
PerformJump(MoveSystem.JumpTypes.JumpFromWall, jumpDirection);
|
||||
PerformJump(JumpTypes.JumpFromWall, jumpDirection);
|
||||
}
|
||||
private void PerformJump(MoveSystem.JumpTypes jumpType, Vector3? jumpDirection = null)
|
||||
private void PerformJump(JumpTypes jumpType, Vector3? jumpDirection = null)
|
||||
{
|
||||
var effectiveJumpDirection = jumpDirection ?? Vector3.Up;
|
||||
var jumpVector = (effectiveJumpDirection.Normalized() + Vector3.Up).Normalized();
|
||||
if (jumpType == JumpTypes.DoubleJump)
|
||||
_canDash = false;
|
||||
|
||||
// var proportionOfTimeGone = _timeAfterDashingTimer.TimeLeft / _timeAfterDashingTimer.WaitTime;
|
||||
// var actualBoost = 1 + MaxJumpBoostAfterDashing * proportionOfTimeGone;
|
||||
@ -482,17 +519,65 @@ public partial class PlayerController : CharacterBody3D
|
||||
bool doesCapsuleHaveCrouchingHeight = CapsuleCollider.IsCrouchingHeight();
|
||||
bool isPlayerDead = HealthSystem.IsDead();
|
||||
if (!doesCapsuleHaveCrouchingHeight && !isPlayerDead)
|
||||
MoveSystem.Jump(jumpType, jumpVector);
|
||||
Jump(jumpType, jumpVector);
|
||||
}
|
||||
|
||||
public void Jump(JumpTypes jumpType, Vector3? jumpDirection = null, float boost = 1.0f)
|
||||
{
|
||||
var effectiveJumpDirection = jumpDirection ?? Vector3.Up;
|
||||
var jumpForce = 0.0f;
|
||||
switch (jumpType)
|
||||
{
|
||||
case JumpTypes.DoubleJump:
|
||||
jumpForce = CalculateDoubleJumpForce();
|
||||
break;
|
||||
case JumpTypes.SimpleJump:
|
||||
jumpForce = CalculateJumpForce();
|
||||
break;
|
||||
case JumpTypes.JumpFromDash:
|
||||
jumpForce = CalculateJumpFromDashForce();
|
||||
break;
|
||||
case JumpTypes.JumpFromWall:
|
||||
jumpForce = CalculateJumpFromWallForce();
|
||||
break;
|
||||
default:
|
||||
jumpForce = CalculateJumpForce();
|
||||
break;
|
||||
}
|
||||
|
||||
var currentHorizontalVelocity = new Vector3(Velocity.X, 0, Velocity.Z);
|
||||
var jumpVelocity = jumpForce * effectiveJumpDirection * boost;
|
||||
Velocity = currentHorizontalVelocity + jumpVelocity;
|
||||
}
|
||||
|
||||
// Mantling
|
||||
public void Mantle()
|
||||
{
|
||||
_playerState.SendEvent("mantle");
|
||||
var optionTween = MoveSystem.Mantle();
|
||||
|
||||
var optionTween = FindMantle();
|
||||
if (optionTween.IsSome(out var tween))
|
||||
tween.Finished += MantleFinished;
|
||||
}
|
||||
|
||||
public bool CanMantle()
|
||||
{
|
||||
var mantleLocationResult = MantleSystem.FindMantleInFrontOfPlayer();
|
||||
return mantleLocationResult.IsSome(out _);
|
||||
}
|
||||
|
||||
public Option<Tween> FindMantle()
|
||||
{
|
||||
var mantleLocationResult = MantleSystem.FindMantleInFrontOfPlayer();
|
||||
if (mantleLocationResult.IsSome(out var mantleLocation))
|
||||
{
|
||||
var duration = 0.1f * mantleLocation.DistanceTo(Position);
|
||||
var tween = TweenQueueSystem.TweenToLocation(new TweenQueueSystem.TweenInputs(mantleLocation, duration));
|
||||
return tween.Some();
|
||||
}
|
||||
return Option<Tween>.None;
|
||||
}
|
||||
|
||||
public void MantleFinished()
|
||||
{
|
||||
_playerState.SendEvent("grounded");
|
||||
@ -635,22 +720,14 @@ public partial class PlayerController : CharacterBody3D
|
||||
// Physics processes
|
||||
public void HandleGrounded(float delta)
|
||||
{
|
||||
MoveOnGround(delta);
|
||||
_canDash = true;
|
||||
if (!isOnFloorCustom())
|
||||
_playerState.SendEvent("start_falling");
|
||||
}
|
||||
public void HandleGroundedStanding(float delta)
|
||||
{
|
||||
CapsuleCollider.UndoCrouching(delta, 1);
|
||||
HeadSystem.SetHeight(CapsuleCollider.GetCurrentHeight());
|
||||
}
|
||||
public void HandleGroundedCrouched(float delta)
|
||||
{
|
||||
CapsuleCollider.Crouch(delta, 1);
|
||||
HeadSystem.SetHeight(CapsuleCollider.GetCurrentHeight());
|
||||
}
|
||||
public void HandleAirborne(float delta)
|
||||
{
|
||||
MoveInAir(delta);
|
||||
if (isOnFloorCustom())
|
||||
_playerState.SendEvent("grounded");
|
||||
if (WallHugSystem.IsWallHugging() && Velocity.Y < 0)
|
||||
@ -658,12 +735,19 @@ public partial class PlayerController : CharacterBody3D
|
||||
}
|
||||
public void HandleWallHugging(float delta)
|
||||
{
|
||||
WallHug(delta);
|
||||
if (isOnFloorCustom())
|
||||
_playerState.SendEvent("grounded");
|
||||
if (!WallHugSystem.IsWallHugging())
|
||||
_playerState.SendEvent("start_falling");
|
||||
}
|
||||
|
||||
public void HandleWallHanging(float delta)
|
||||
{
|
||||
WallHang(delta);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////
|
||||
// Stateless logic ////////
|
||||
///////////////////////////
|
||||
@ -672,28 +756,63 @@ public partial class PlayerController : CharacterBody3D
|
||||
Vector2 inputLookDir = new Vector2(_inputRotateY, _inputRotateFloorplane);
|
||||
HeadSystem.LookAround(inputLookDir);
|
||||
}
|
||||
|
||||
private void MoveAround(double delta)
|
||||
|
||||
public void MoveOnGround(double delta)
|
||||
{
|
||||
var moveAroundParams = new MoveSystem.MoveAroundParameters(
|
||||
delta,
|
||||
_inputMove,
|
||||
isOnFloorCustom(),
|
||||
HealthSystem.IsDead(),
|
||||
IsHeadTouchingCeiling(),
|
||||
_onWallHanging.Active,
|
||||
_onWallHugging.Active);
|
||||
MoveSystem.MoveAround(moveAroundParams);
|
||||
Vector3 direction = HeadSystem.Transform.Basis * _inputMove;
|
||||
|
||||
var accelerationFactor = direction.Length() > 0 ? AccelerationSpeedFactorFloor : DecelerationSpeedFactorFloor;
|
||||
|
||||
float xAcceleration = Mathf.Lerp(Velocity.X, direction.X * _targetSpeed,
|
||||
(float)delta * accelerationFactor);
|
||||
float zAcceleration = Mathf.Lerp(Velocity.Z, direction.Z * _targetSpeed,
|
||||
(float)delta * accelerationFactor);
|
||||
Velocity = new Vector3(xAcceleration, Velocity.Y, zAcceleration);
|
||||
}
|
||||
|
||||
public void MoveInAir(double delta)
|
||||
{
|
||||
Velocity = new Vector3(
|
||||
x: Velocity.X,
|
||||
y: Velocity.Y - (CalculateGravityForce() * (float)delta),
|
||||
z: Velocity.Z);
|
||||
|
||||
// The code below is required to quickly adjust player's position on Y-axis when there's a ceiling on the
|
||||
// trajectory of player's jump and player is standing
|
||||
if (IsHeadTouchingCeiling())
|
||||
{
|
||||
Velocity = new Vector3(
|
||||
x: Velocity.X,
|
||||
y: Velocity.Y - 2.0f,
|
||||
z: Velocity.Z);
|
||||
}
|
||||
}
|
||||
|
||||
public void WallHug(float delta)
|
||||
{
|
||||
float xAcceleration = Mathf.Lerp(Velocity.X, 0,
|
||||
(float)delta * WallHugHorizontalDeceleration);
|
||||
float zAcceleration = Mathf.Lerp(Velocity.Z, 0,
|
||||
(float)delta * WallHugHorizontalDeceleration);
|
||||
Velocity = new Vector3(
|
||||
x: xAcceleration,
|
||||
y: -WallHugDownwardSpeed,
|
||||
z: zAcceleration);
|
||||
}
|
||||
|
||||
public void WallHang(float delta)
|
||||
{
|
||||
Velocity = Vector3.Zero;
|
||||
MoveAndSlide();
|
||||
}
|
||||
|
||||
private void HandleStairs(float delta)
|
||||
{
|
||||
|
||||
StairsSystem.UpStairsCheckParams upStairsCheckParams = new StairsSystem.UpStairsCheckParams
|
||||
{
|
||||
IsOnFloorCustom = isOnFloorCustom(),
|
||||
IsCapsuleHeightLessThanNormal = CapsuleCollider.IsCapsuleHeightLessThanNormal(),
|
||||
CurrentSpeedGreaterThanWalkSpeed = MoveSystem._currentSpeed > MoveSystem.WalkSpeed,
|
||||
CurrentSpeedGreaterThanWalkSpeed = false,
|
||||
IsCrouchingHeight = CapsuleCollider.IsCrouchingHeight(),
|
||||
Delta = (float)delta,
|
||||
FloorMaxAngle = FloorMaxAngle,
|
||||
@ -714,7 +833,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
|
||||
StairsSystem.DownStairsCheckParams downStairsCheckParams = new StairsSystem.DownStairsCheckParams
|
||||
{
|
||||
IsOnFloor = IsOnFloor(), // TODO: replace on IsOnFloor Custom
|
||||
IsOnFloor = IsOnFloor(),
|
||||
IsCrouchingHeight = CapsuleCollider.IsCrouchingHeight(),
|
||||
LastFrameWasOnFloor = _lastFrameWasOnFloor,
|
||||
CapsuleDefaultHeight = CapsuleCollider.GetDefaultHeight(),
|
||||
@ -737,7 +856,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
StairsSystem.SlideCameraParams slideCameraParams = new StairsSystem.SlideCameraParams
|
||||
{
|
||||
IsCapsuleHeightLessThanNormal = CapsuleCollider.IsCapsuleHeightLessThanNormal(),
|
||||
CurrentSpeedGreaterThanWalkSpeed = MoveSystem._currentSpeed > MoveSystem.WalkSpeed,
|
||||
CurrentSpeedGreaterThanWalkSpeed = false,
|
||||
BetweenCrouchingAndNormalHeight = CapsuleCollider.IsBetweenCrouchingAndNormalHeight(),
|
||||
Delta = (float)delta
|
||||
};
|
||||
@ -758,7 +877,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
{
|
||||
IsCrouchingHeight = CapsuleCollider.IsCrouchingHeight(),
|
||||
Delta = (float)delta,
|
||||
SprintSpeed = MoveSystem.SprintSpeed,
|
||||
SprintSpeed = WalkSpeed,
|
||||
Velocity = Velocity
|
||||
};
|
||||
FieldOfView.PerformFovAdjustment(fovParams);
|
||||
@ -767,6 +886,13 @@ public partial class PlayerController : CharacterBody3D
|
||||
///////////////////////////
|
||||
// Helpers ////////////////
|
||||
///////////////////////////
|
||||
|
||||
public float CalculateJumpForce() => _gravity * StartVelocity;
|
||||
public float CalculateJumpFromDashForce() => CalculateJumpForce() * JumpFromDashSpeedFactor;
|
||||
public float CalculateJumpFromWallForce() => CalculateJumpForce() * JumpFromWallSpeedFactor;
|
||||
public float CalculateDoubleJumpForce() => CalculateJumpForce() * DoubleJumpSpeedFactor;
|
||||
public float CalculateGravityForce() => _gravity * Weight;
|
||||
|
||||
public void ReduceTimeScaleWhileAiming()
|
||||
{
|
||||
Engine.SetTimeScale(TimeScaleAimInAir);
|
||||
@ -808,7 +934,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
TweenQueueSystem.ProcessTweens();
|
||||
|
||||
LookAround();
|
||||
MoveAround(delta);
|
||||
// MoveAround(delta);
|
||||
CameraModifications((float) delta);
|
||||
HandleStairs((float) delta);
|
||||
}
|
||||
|
Reference in New Issue
Block a user