Осталось пофиксить толка бак с камерай
This commit is contained in:
1 parent
0e1c274677
commit
d1aad440f5
3 files changed
+13
-14
No files matched your search
+2
@@ -54,6 +54,8 @@ namespace Code.Gameplay.Character.Controller.Abilities
|
|||||||
// Проекция скорости на направление к стене (отрицательная, если летим в стену)
|
// Проекция скорости на направление к стене (отрицательная, если летим в стену)
|
||||||
var velocityIntoWall = Vector3.Dot(currentVelocity, -hitNormal);
|
var velocityIntoWall = Vector3.Dot(currentVelocity, -hitNormal);
|
||||||
|
|
||||||
|
Debug.Log($"[TryClimbWall] velIntoWall={velocityIntoWall:F2}, min={_minWallClimbSpeed}, climbed={_hasClimbedThisWallSession}, cooldown={_wallClimbCooldownTimer:F2}");
|
||||||
|
|
||||||
// Если движемся в стену с достаточной скоростью
|
// Если движемся в стену с достаточной скоростью
|
||||||
if (velocityIntoWall > _minWallClimbSpeed)
|
if (velocityIntoWall > _minWallClimbSpeed)
|
||||||
{
|
{
|
||||||
|
|||||||
+10
-13
@@ -96,7 +96,6 @@ namespace Code.Gameplay.Character.Controller.Abilities
|
|||||||
{
|
{
|
||||||
if (!_characterTransform) return;
|
if (!_characterTransform) return;
|
||||||
|
|
||||||
var isGrounded = motor.GroundingStatus.IsStableOnGround;
|
|
||||||
var currentPosition = motor.TransientPosition;
|
var currentPosition = motor.TransientPosition;
|
||||||
|
|
||||||
var isStillNearWall = false;
|
var isStillNearWall = false;
|
||||||
@@ -109,19 +108,17 @@ namespace Code.Gameplay.Character.Controller.Abilities
|
|||||||
|
|
||||||
if (_isLeaningOnWall)
|
if (_isLeaningOnWall)
|
||||||
{
|
{
|
||||||
switch (isGrounded)
|
var isBelowContactHeight = currentPosition.y < _lastWallContactHeight;
|
||||||
|
|
||||||
|
if (!isStillNearWall || isBelowContactHeight)
|
||||||
{
|
{
|
||||||
case true when !isStillNearWall:
|
_isLeaningOnWall = false;
|
||||||
case false when !isStillNearWall:
|
}
|
||||||
_isLeaningOnWall = false;
|
else
|
||||||
break;
|
{
|
||||||
default:
|
var heightDelta = currentPosition.y - _lastWallContactHeight;
|
||||||
{
|
var targetLeanFactor = Mathf.Clamp01(heightDelta * _heightScale);
|
||||||
var heightDelta = currentPosition.y - _lastWallContactHeight;
|
_leanFactor = Mathf.Lerp(_leanFactor, targetLeanFactor, 1f - Mathf.Exp(-_leanSharpness * deltaTime));
|
||||||
var targetLeanFactor = Mathf.Clamp01(heightDelta * _heightScale);
|
|
||||||
_leanFactor = Mathf.Lerp(_leanFactor, targetLeanFactor, 1f - Mathf.Exp(-_leanSharpness * deltaTime));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!4 &678700802
|
--- !u!4 &678700802
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
Reference in new issue
Block a user