gd: made wall jump more intuitive and act like a double jump
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 17s
Create tag and build when new code gets to main / Export (push) Failing after 1s

This commit is contained in:
2025-07-04 14:15:09 +02:00
parent cf98e6c36c
commit 767d0fc768
6 changed files with 50 additions and 20 deletions

View File

@ -29,4 +29,9 @@ public partial class HeadSystem : Node3D
_camera.Rotation = currentCameraRotation;
}
public Vector3 GetForwardHorizontalVector()
{
return GetGlobalTransform().Basis.Z;
}
}

View File

@ -8,9 +8,10 @@ public partial class MoveSystem : Node3D
{
public enum JumpTypes
{
SIMPLE_JUMP,
DOUBLE_JUMP,
JUMP_FROM_DASH
SimpleJump,
DoubleJump,
JumpFromDash,
JumpFromWall
}
public record MoveSystemParameters(
@ -196,15 +197,18 @@ public partial class MoveSystem : Node3D
var jumpForce = 0.0f;
switch (jumpType)
{
case JumpTypes.DOUBLE_JUMP:
case JumpTypes.DoubleJump:
jumpForce = _gravity.CalculateDoubleJumpForce();
break;
case JumpTypes.SIMPLE_JUMP:
case JumpTypes.SimpleJump:
jumpForce = _gravity.CalculateJumpForce();
break;
case JumpTypes.JUMP_FROM_DASH:
case JumpTypes.JumpFromDash:
jumpForce = _gravity.CalculateJumpFromDashForce();
break;
case JumpTypes.JumpFromWall:
jumpForce = _gravity.CalculateJumpFromWallForce();
break;
default:
jumpForce = _gravity.CalculateJumpForce();
break;

View File

@ -74,7 +74,6 @@ public partial class WeaponSystem : RigidBody3D
Freeze = true;
GlobalPosition = PlantLocation;
LookAt(GlobalTransform.Origin + PlantNormal, Vector3.Up, true);
GD.Print(GlobalRotation);
}
public void OnThrownWeaponReachesGround(Node other)