Фикс приколов с камерой
This commit is contained in:
1 parent
a2acea39dc
commit
3bb99aaf1e
1 file changed
+1
-1
@@ -116,7 +116,7 @@ namespace Code.Gameplay.Camera.CameraStates
|
|||||||
protected void HandleRotationInput(float deltaTime, Vector3 rotationInput, out Quaternion targetRotation)
|
protected void HandleRotationInput(float deltaTime, Vector3 rotationInput, out Quaternion targetRotation)
|
||||||
{
|
{
|
||||||
// Вращение вокруг вертикальной оси (горизонтальный поворот)
|
// Вращение вокруг вертикальной оси (горизонтальный поворот)
|
||||||
var rotationFromInput = Quaternion.Euler(FollowTransform.up * (rotationInput.x * RotationSpeed));
|
var rotationFromInput = Quaternion.Euler(Vector3.up * (rotationInput.x * RotationSpeed));
|
||||||
PlanarDirection = rotationFromInput * PlanarDirection;
|
PlanarDirection = rotationFromInput * PlanarDirection;
|
||||||
var planarRotation = Quaternion.LookRotation(PlanarDirection, FollowTransform.up);
|
var planarRotation = Quaternion.LookRotation(PlanarDirection, FollowTransform.up);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user