groundslide camera setup
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 10m16s

This commit is contained in:
2026-01-14 17:21:57 +01:00
parent ca77579168
commit 6737668391
3 changed files with 36 additions and 8 deletions

View File

@@ -793,7 +793,7 @@ public partial class PlayerController : CharacterBody3D
var wallHugContactPoint = _onWallRunning.Active ? _currentWallContactPoint : Vector3.Zero;
var playerVelocity = GetGlobalMoveInput();
HeadSystem.LookAround(delta, inputLookDir, playerVelocity, wallHugContactPoint, lookSensitivity);
HeadSystem.LookAround(delta, inputLookDir, playerVelocity, Velocity, wallHugContactPoint, lookSensitivity, isSliding: _groundSliding.Active);
}
public void RotateWeaponWithPlayer()
{
@@ -808,7 +808,7 @@ public partial class PlayerController : CharacterBody3D
Bobbing.CameraBobbingParams cameraBobbingParams = new Bobbing.CameraBobbingParams
{
Delta = delta,
IsOnFloorCustom = isOnFloorCustom() || _onWallRunning.Active,
IsOnFloorCustom = _grounded.Active || _onWallRunning.Active,
Velocity = Velocity,
SettingsMultiplier = _headBobbingMultiplier
};
@@ -1267,7 +1267,8 @@ public partial class PlayerController : CharacterBody3D
public void OnInputSlideStarted()
{
_isSlideInputDown = true;
_playerState.SendEvent("slide");
if (Velocity.Length() > WalkSpeed/2f)
_playerState.SendEvent("slide");
}
public void OnInputSlideEnded()
{
@@ -1711,14 +1712,13 @@ public partial class PlayerController : CharacterBody3D
CameraModifications((float) delta);
MoveSlideAndHandleStairs((float) delta);
MantleSystem.ProcessMantle(_grounded.Active);
if (WeaponSystem.InHandState.Active)
RotateWeaponWithPlayer();
if (WeaponSystem.InHandState.Active && !_aiming.Active && TutorialDone)
{
DashIndicatorMesh.Visible = false;
}
if (!WeaponSystem.InHandState.Active && TutorialDone)
{
DashIndicatorMesh.Visible = true;