Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Warpoint public
Simple Vr Move
Commits
68fe5f83
Commit
68fe5f83
authored
3 years ago
by
Yuriy Votintsev
Browse files
Options
Download
Email Patches
Plain Diff
Auto find head in rig. Remove log spam.
parent
24f34800
main
1.0.1
1.0.0
No related merge requests found
Pipeline
#26
failed with stages
in 0 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Runtime/VRCameraMove.cs
+5
-5
Runtime/VRCameraMove.cs
with
5 additions
and
5 deletions
+5
-5
Runtime/VRCameraMove.cs
+
5
-
5
View file @
68fe5f83
...
...
@@ -4,15 +4,16 @@ namespace Warpoint.SimpleVrMove
{
public
class
VRCameraMove
:
MonoBehaviour
{
private
SimpleVrMoveInput
_input
;
[
SerializeField
]
private
Transform
_head
;
public
float
MoveSpeed
;
public
float
RotateSpeed
;
private
SimpleVrMoveInput
_input
;
private
Transform
_head
;
private
void
Awake
()
{
_input
=
new
SimpleVrMoveInput
();
_head
=
GetComponentInChildren
<
Camera
>().
transform
;
}
private
void
OnEnable
()
...
...
@@ -31,8 +32,6 @@ namespace Warpoint.SimpleVrMove
var
verticalMove
=
_input
.
VR
.
VerticalMove
.
ReadValue
<
float
>();
var
rotate
=
_input
.
VR
.
Rotate
.
ReadValue
<
float
>();
Debug
.
Log
(
verticalMove
);
RotateCamera
(
rotate
);
MoveCamera
(
horizontalMove
,
verticalMove
);
}
...
...
@@ -42,6 +41,7 @@ namespace Warpoint.SimpleVrMove
var
forward
=
_head
.
forward
;
forward
.
y
=
0
;
forward
.
Normalize
();
var
right
=
_head
.
right
;
right
.
y
=
0
;
right
.
Normalize
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets