Я ненавижу наклоны (не прорвёмся)
This commit is contained in:
1 parent
d10d2cdca6
commit
766609489d
7 files changed
+97
-1463
No files matched your search
+9
-18
@@ -30,7 +30,7 @@ namespace Code.Gameplay.Character.Controller
|
||||
private SlideMechanic _slideMechanic;
|
||||
// private WallClimbMechanic _wallClimbMechanic;
|
||||
private WallRunningMechanic _wallRunningMechanic;
|
||||
//private WallLeanMechanic _wallLeanMechanic;
|
||||
private WallLeanMechanic _wallLeanMechanic;
|
||||
private GroundMovementSystem _groundMovement;
|
||||
private AirMovementSystem _airMovement;
|
||||
|
||||
@@ -72,11 +72,8 @@ namespace Code.Gameplay.Character.Controller
|
||||
_wallRunningMechanic.WallDetachImpulse = 7.0f;
|
||||
_wallRunningMechanic.WallContactAngleThreshold = 45.0f;
|
||||
|
||||
/*_wallLeanMechanic = new WallLeanMechanic(
|
||||
_characterConfig.maxWallLeanAngle,
|
||||
_characterConfig.wallLeanSharpness,
|
||||
_characterConfig.wallLeanHeightScale
|
||||
);*/
|
||||
_wallLeanMechanic = new WallLeanMechanic(
|
||||
);
|
||||
_groundMovement = new GroundMovementSystem(
|
||||
_characterConfig.maxStableMoveSpeed,
|
||||
_characterConfig.sprintMoveSpeed,
|
||||
@@ -89,7 +86,7 @@ namespace Code.Gameplay.Character.Controller
|
||||
motor.CharacterController = this; // Регистрация этого контроллера в движке
|
||||
_inputHandler.FirstPersonCameraRotation =
|
||||
motor.Transform.rotation; // Начальное вращение совпадает с персонажемс
|
||||
//_wallLeanMechanic.SetCharacterTransform(characterTransform);
|
||||
_wallLeanMechanic.SetModel(characterTransform);
|
||||
_wallRunningMechanic.Initialize(motor, _inputHandler);
|
||||
}
|
||||
|
||||
@@ -233,16 +230,15 @@ namespace Code.Gameplay.Character.Controller
|
||||
{
|
||||
_slideMechanic.EndSlide();
|
||||
}
|
||||
|
||||
// if (motor.GroundingStatus.IsStableOnGround)
|
||||
// {
|
||||
// _wallClimbMechanic.ResetWallClimbSession();
|
||||
// }
|
||||
}
|
||||
|
||||
public void AfterCharacterUpdate(float deltaTime)
|
||||
{
|
||||
//_wallLeanMechanic.UpdateLean(motor, deltaTime);
|
||||
_wallLeanMechanic.Update(
|
||||
_wallRunningMechanic.IsWallRunning,
|
||||
_wallRunningMechanic.GetWallNormal(),
|
||||
motor.CharacterForward
|
||||
);
|
||||
}
|
||||
|
||||
public bool IsColliderValidForCollisions(Collider coll)
|
||||
@@ -258,14 +254,9 @@ namespace Code.Gameplay.Character.Controller
|
||||
public void OnMovementHit(Collider hitCollider, Vector3 hitNormal, Vector3 hitPoint,
|
||||
ref HitStabilityReport hitStabilityReport)
|
||||
{
|
||||
// Попытка начать Wall Run при ударе о поверхность
|
||||
if (_wallRunningMechanic.TryStartWallRun(hitNormal, hitPoint))
|
||||
{
|
||||
//_wallLeanMechanic.OnWallContact(motor, hitNormal, motor.TransientPosition.y);
|
||||
}
|
||||
|
||||
// if (_wallClimbMechanic.TryClimbWall(motor, hitNormal))
|
||||
// _wallLeanMechanic.OnWallContact(motor, hitNormal, motor.TransientPosition.y);
|
||||
}
|
||||
|
||||
public void ProcessHitStabilityReport(Collider hitCollider, Vector3 hitNormal, Vector3 hitPoint,
|
||||
|
||||
Reference in new issue
Block a user