groundslide camera setup
This commit is contained in:
@@ -156,6 +156,7 @@ debug_color = Color(0, 0.6, 0.701961, 0.341176)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
||||
CameraInclineAcceleration = 20.0
|
||||
GroundedCameraIncline = 3.0
|
||||
SlidingJitterAmplitude = 0.2
|
||||
|
||||
[node name="MantleSystem" parent="HeadSystem" instance=ExtResource("8_qu4wy")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.6, 0)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user