put the player back in its place
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
transform = Transform3D(-0.1772511, 0.44628847, 0.87715954, 0.49540228, -0.72966087, 0.4713508, 0.85038733, 0.51809436, -0.09175911, 0, 0, 0)
|
||||
|
||||
[node name="Player" parent="." index="6" unique_id=1309399929]
|
||||
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, -16, 22.91025, -51.458496)
|
||||
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, -0.5, 0.4102497, 0.5415039)
|
||||
HasSword = false
|
||||
HasParry = false
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ graph_offset = Vector2(-180.277, 49)
|
||||
[node name="MainMenu" unique_id=766584506 instance=ExtResource("1_my8ii")]
|
||||
script = ExtResource("2_nyjay")
|
||||
level_select_packed_scene = ExtResource("3_8i6b8")
|
||||
game_scene_path = "uid://bx3cd2hoaok3k"
|
||||
game_scene_path = "uid://bd0d7gvinx35c"
|
||||
menu_context = ExtResource("3_ytpwg")
|
||||
back_action = ExtResource("4_8i6b8")
|
||||
|
||||
|
||||
@@ -869,7 +869,8 @@ public partial class PlayerController : CharacterBody3D,
|
||||
var haveEnoughSpeed = hvelProjected.Length() > WallRunSpeedThreshold;
|
||||
var isCoplanarEnough = Velocity.AngleTo(wallNormal) > Math.PI/4 && Velocity.AngleTo(wallNormal) < 3*Math.PI/4;
|
||||
var isGoingDownwards = Velocity.AngleTo(Vector3.Down) < Math.PI/4;
|
||||
return haveEnoughSpeed && isCoplanarEnough && !isGoingDownwards && isIndeedWall && !_coyoteEnabled.Active;
|
||||
var shouldStart = haveEnoughSpeed && isCoplanarEnough && !isGoingDownwards && isIndeedWall;
|
||||
return shouldStart;
|
||||
}
|
||||
|
||||
public float ComputeVerticalSpeedGravity(float delta)
|
||||
@@ -1300,12 +1301,12 @@ public partial class PlayerController : CharacterBody3D,
|
||||
{
|
||||
if (IsTryingToMantle()) _playerState.SendEvent("mantle");
|
||||
|
||||
if (ShouldStartWallRun() && Velocity.Y < WallRunUpwardVelocity)
|
||||
{
|
||||
SetVerticalVelocity(WallRunUpwardVelocity);
|
||||
_playerState.SendEvent("wall_run");
|
||||
return;
|
||||
}
|
||||
// if (ShouldStartWallRun() && Velocity.Y < WallRunUpwardVelocity)
|
||||
// {
|
||||
// SetVerticalVelocity(WallRunUpwardVelocity);
|
||||
// _playerState.SendEvent("wall_run");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// Update horizontal velocity
|
||||
var horizontalVelocity = ComputeHVelocityAir(delta);
|
||||
|
||||
Reference in New Issue
Block a user