fixed mantle after dash bug
This commit is contained in:
@@ -53,6 +53,7 @@ WalkSpeed = 7.5
|
||||
AccelerationAir = 2.0
|
||||
DecelerationAir = 0.1
|
||||
Weight = 5.0
|
||||
MantleTime = 0.2
|
||||
SimpleJumpStartVelocity = 8.0
|
||||
SimpleJumpHangTimeInFrames = 1
|
||||
SimpleJumpGravityLesseningFactor = 2.5
|
||||
|
||||
@@ -310,7 +310,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
// Movement stuff
|
||||
// Getting universal setting from GODOT editor to be in sync
|
||||
_gravity = (float)ProjectSettings.GetSetting("physics/3d/default_gravity");
|
||||
MantleSystem.Init(HeadSystem);
|
||||
MantleSystem.Init();
|
||||
StairsSystem.Init(stairsBelowRayCast3D, stairsAheadRayCast3D, cameraSmooth);
|
||||
DashSystem.Init(HeadSystem, camera, TweenQueueSystem);
|
||||
WeaponSystem.Init(HeadSystem, camera);
|
||||
@@ -438,7 +438,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
{
|
||||
if (CanMantle())
|
||||
{
|
||||
MantleToLocation(MantleSystem.FindMantleInFrontOfPlayer().Unwrap());
|
||||
MantleToLocation(MantleSystem.FindMantleForHeadRotation(HeadSystem.Rotation.Y).Unwrap());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -871,7 +871,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
{
|
||||
// Try mantling but don't know if this is useful
|
||||
if (CanMantle())
|
||||
MantleToLocation(MantleSystem.FindMantleInFrontOfPlayer().Unwrap());
|
||||
MantleToLocation(MantleSystem.FindMantleForHeadRotation(HeadSystem.Rotation.Y).Unwrap());
|
||||
}
|
||||
|
||||
public void FinishPoweredDash()
|
||||
@@ -912,7 +912,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
// Mantling
|
||||
public bool CanMantle()
|
||||
{
|
||||
var mantleLocationResult = MantleSystem.FindMantleInFrontOfPlayer();
|
||||
var mantleLocationResult = MantleSystem.FindMantleForHeadRotation(HeadSystem.Rotation.Y);
|
||||
return mantleLocationResult.IsSome(out _);
|
||||
}
|
||||
public void MantleToLocation(Vector3 location)
|
||||
|
||||
Reference in New Issue
Block a user