Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
unity
FPSControl
Commits
a7894185
Commit
a7894185
authored
Jun 21, 2020
by
David Huss
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Pitch
parent
41421262
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
SmoothMouseLook.cs
SmoothMouseLook.cs
+1
-1
No files found.
SmoothMouseLook.cs
View file @
a7894185
...
...
@@ -125,7 +125,7 @@ public class SmoothMouseLook : MonoBehaviour
// right direction for the head).
// Note: 90 deg need to be added, to get the initial orientation right
var
bodyRotation
=
Quaternion
.
AngleAxis
(
yaw
+
90
,
Vector3
.
up
);
var
headRotation
=
Quaternion
.
AngleAxis
(
pitch
+
90
,
Vector3
.
right
);
var
headRotation
=
Quaternion
.
AngleAxis
(
pitch
,
Vector3
.
right
);
// Finally combine the rotations for body and head with the start rotations
transform
.
localRotation
=
bodyRotation
*
bodyStartOrientation
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment