Fix shooting direction

This commit is contained in:
Jens Pitkänen 2020-08-10 20:49:24 +03:00
parent a2e57c2988
commit 4c70ab991b
2 changed files with 2 additions and 2 deletions

View File

@ -1713,7 +1713,7 @@ MonoBehaviour:
BulletSourcePoint: {fileID: 2637233632139837434}
BulletHitLayer:
serializedVersion: 2
m_Bits: 823
m_Bits: 768
BulletPassLayer:
serializedVersion: 2
m_Bits: 8192

View File

@ -285,7 +285,7 @@ namespace NeonTea.Quakeball.Players {
float TargetLean = -Vector3.Dot(GroundVelocity / MoveStyle.TargetVelocity, CameraRoot.right) * MoveStyle.LeanDegrees;
Lean = Mathf.Lerp(Lean, TargetLean, 30f * Time.deltaTime);
CameraRoot.localEulerAngles = new Vector3(Pitch, Yaw, Lean);
CameraRoot.localEulerAngles = new Vector3(Pitch - CameraRoot.parent.eulerAngles.x, Yaw - CameraRoot.parent.eulerAngles.y, Lean);
}
private void LateUpdate() {