Forum Discussion
hash280689
11 years agoHonored Guest
OVRPlayer does'nt properly inherit orientation of parent
To give some background, my OVRPlayer object is placed on the bridge of a ship. It is a child of this ship object. When the ship moves, the position of the OVRPlayer is fine. When the ship itself rotates though, the player orientation goes out of wack. For example, my OVRPlayer will pull to the left of right when I begin moving. The OVR Cameras attached to the player follow the orientation absolutely fine. I really do not know how to fix this.
Thanks
Thanks
5 Replies
Replies have been turned off for this discussion
- GeraldExpert Protegeyou likely have some issue with parent/child orientation translation while also having the "follow orientation" doing something similar.
please be more specific what happens. maybe add a screenshot of how your gameobjects are parented and what the settings on the controller are. - hash280689Honored GuestOk, the heirarchy is as follows-
Ship-Wrapper --- Transforms are applied to this game object to move the ship around
=>Ship --This is the Mesh of Ship. There is a looping animation on this mesh that makes it 'rock on the water'
==>OVR Player Controller
I am using SDK version 0.4.2, although I've had this problem since I began making this with 0.2. On the OVR player the only parameters I have changed are the height and radius of the character controller.
On the OVRPlayerController, I have set 'follow orientation' to the transform of the main parent object. Even if this is not set, I still get the same problem. Finally, '~Tracker Rotates Y is enabled'. Everything else is set to default.
So the problem is that when I am walking around freely on the ship while it is moving, when the ship rotates on the y-axis, the player movement becomes 'wonky'. For example, if I attempted to walk from one end of the bridge to the other in a straight line, my player will constantly pull to to the left or right, regardless of whether the camera orientation is correct or not.
Some of the data I am working with is sensitive so sorry about the lack of screenshots - GeraldExpert ProtegeI have noticed weird behavior with nested gameobjects and rotations - do you use the OVRPlayerController?
If yes, have you tried a normal player controller and just adding the OVRCameraController to it instead?
Iirc the OVRPlayerController uses your looking direction as forward (there is the ForwardDirection gameobject you might want to have a look at when things get wonky) - using a normal Playercontroller will disable that and at the very least it could help you narrow the error source down. - cyberealityGrand ChampionOVRPlayerController is pretty bare-bones, and really isn't designed to be used in a real game (aside from simple walk-throughs). You may want to try using the default Unity first-person controller and putting the OVRCameraController inside. You can use the FollowOrientation parameter to sync them together. I know this helped with moving platforms and elevators. I did not try to rotating objects but it guess it could work.
- hash280689Honored GuestSweet!!
That seems to have done the trick. For those who are wondering, I made sure to uncheck the 'Moving Platform' and 'Sliding Options' in the Character Motor script. The transforms are working as I expect them to now.
Massive thanks to both of you
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
- 6 months ago
- 3 years ago