Forum Discussion
MacOSXprogramme
11 years agoHonored Guest
Problem with Player
I am having a problem with my OVRPlayer.
I have a room with a number of doors. I have a script which opens the various doors. I'm using "if (Physics.Raycast (transform.position, transform.forward, out hit, distTo))" to detect my position in front of the door. If I use the mouse to rotate my character, the desired door opens as designed. But if I use the HMD head tracking to rotate to the door, 'forward' doesn't seem to work. It seems to be tied to the last angle (character rotation) as set by using the mouse.
Does this mean that my head tracking rotation is not working? Or how do I lock the direction of the player to the direction as seen by head tracking.
Thanks in advance for any help.
I have a room with a number of doors. I have a script which opens the various doors. I'm using "if (Physics.Raycast (transform.position, transform.forward, out hit, distTo))" to detect my position in front of the door. If I use the mouse to rotate my character, the desired door opens as designed. But if I use the HMD head tracking to rotate to the door, 'forward' doesn't seem to work. It seems to be tied to the last angle (character rotation) as set by using the mouse.
Does this mean that my head tracking rotation is not working? Or how do I lock the direction of the player to the direction as seen by head tracking.
Thanks in advance for any help.
2 Replies
Replies have been turned off for this discussion
- MikeFTrusteeif your raycast origin is the root game object of OVR player controller then you might get this problem.
try raycasting from the left or right camera inside the OVR camera controller, or the forward direction game object if you dont need the ability to aim the raycast up and down - MacOSXprogrammeHonored GuestThanks, MikeF.
In view of your post, I attached the script containing the Raycast to the CenterEyeAnchor. My model works great. Thanks, again.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 8 months ago
- 7 months ago
- 2 years ago