Я ЛЮБЛЮ ПУЛ
This commit is contained in:
1 parent
f8448ba922
commit
177464cc09
2 files changed
+31
-8
No files matched your search
+30
-7
@@ -41,13 +41,36 @@ namespace Code.Gameplay.Character.Controller.Abilities
|
|||||||
|
|
||||||
_leanDirection = -_lastWallNormal;
|
_leanDirection = -_lastWallNormal;
|
||||||
_leanDirection = Vector3.ProjectOnPlane(_leanDirection, motor.CharacterUp).normalized;
|
_leanDirection = Vector3.ProjectOnPlane(_leanDirection, motor.CharacterUp).normalized;
|
||||||
|
|
||||||
_leanSign = Mathf.Sign(_lastWallNormal.x != 0
|
//TODO: БЛЯТЬ ПОЛНАЯ ХУЙНЯ НАДО ПЕРЕПИСАТЬ С ИФ ЭЛС НУ Я ПОСЛЕ ПУЛА ПРИДУ И ДОДЕЛАЮ
|
||||||
? Vector3.Dot(_leanDirection, motor.CharacterForward * _lastWallNormal.z)
|
_leanSign = 1;
|
||||||
: Vector3.Dot(_leanDirection, motor.CharacterForward * _lastWallNormal.z));
|
|
||||||
|
if (_leanDirection.x != 0)
|
||||||
Debug.Log("CharacterUp: " + motor.CharacterUp);
|
{
|
||||||
Debug.Log("CharacterForward: " + motor.CharacterForward);
|
if ((int)_leanDirection.x == -1 && motor.CharacterRight.x > 0.1f)
|
||||||
|
_leanSign = -1;
|
||||||
|
else if ((int)_leanDirection.x == -1 && Mathf.Abs(motor.CharacterRight.x) < 0.1f)
|
||||||
|
_leanDirection = new Vector3(0, 0, -1);
|
||||||
|
else if ((int)_leanDirection.x == 1 && motor.CharacterRight.x > 0.1f)
|
||||||
|
_leanSign = -1;
|
||||||
|
else if ((int)_leanDirection.x == 1 && Mathf.Abs(motor.CharacterRight.x) < 0.1f)
|
||||||
|
_leanDirection = new Vector3(0, 0, -1);
|
||||||
|
}
|
||||||
|
else if (_leanDirection.z != 0)
|
||||||
|
{
|
||||||
|
if ((int)_leanDirection.z == 1 && Mathf.Abs(motor.CharacterRight.z) < 0.1f)
|
||||||
|
_leanSign = -1;
|
||||||
|
else if ((int)_leanDirection.z == -1 && motor.CharacterRight.z < -0.1f)
|
||||||
|
_leanDirection = new Vector3(-1, 0, 0);
|
||||||
|
else if ((int)_leanDirection.z == -1 && motor.CharacterRight.z > 0.1f)
|
||||||
|
_leanDirection = new Vector3(1, 0, 0);
|
||||||
|
else if ((int)_leanDirection.z == 1 && motor.CharacterRight.z < -0.1f)
|
||||||
|
_leanDirection = new Vector3(1, 0, 0);
|
||||||
|
else if ((int)_leanDirection.z == 1 && motor.CharacterRight.z > 0.1f)
|
||||||
|
_leanDirection = new Vector3(-1, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Log("LeanDirection: " + _leanDirection);
|
||||||
Debug.Log("CharacterRight: " + motor.CharacterRight);
|
Debug.Log("CharacterRight: " + motor.CharacterRight);
|
||||||
Debug.Log(_leanSign);
|
Debug.Log(_leanSign);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -10, y: 3, z: 0}
|
m_LocalPosition: {x: -10, y: 3, z: 0}
|
||||||
m_LocalScale: {x: 2, y: 6, z: 10}
|
m_LocalScale: {x: 10, y: 6, z: 10}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
|
|||||||
Reference in new issue
Block a user