Forum Discussion
Lordslimeball
4 years agoExplorer
OVRPlayerController does not move with OVRCameraPrefab in Unity
Hello,
I am using Unity 2020 and Oculus Unity Integration SDK 33.
I cannot get the OVRPlayerController to move with the OVRCamera prefab. I would like to know if this is even a possibility any more - the CharacterCameraConstraint script has been changed significantly. I have tried setting up the CharacterCameraConstraint, the SimpleCapsuleMovement, CapsuleCollider and RigidBody onto the OVRPlayerController and it still does not work. In the locomotion example scene the OVRPlayerController also does not follow the camera.
I could not find any documentation for how room based locomotion is supposed to work. I know this worked fine with previous Oculus integrations. Has this feature been removed on purpose? If yes why?
Kind regards,
LordSlimeball
Well I could not get it to work, so if anyone else is having this problem you need to remove OVRPlayerController script (and the script which is dependent on it, can't remember the name right now). Then add another object the position of which is updated to be the same as the position of the CenterEyeAnchor
6 Replies
- extensiveGamerZ3Protege
good job for you to find a solution. I just started experimenting and i'm also using OVRPlayerController and i want to move with locomotion and it doesn't! i push the touch controllers sticks and nothing happens. I wondering why. You say to remove the OVRPlayercontroller script but that has all the stuff about Snap rotation etc which i want for no motion sickness and stuff....and also it has some other stuff about movement.
- LordslimeballExplorer
Well I could not get it to work, so if anyone else is having this problem you need to remove OVRPlayerController script (and the script which is dependent on it, can't remember the name right now). Then add another object the position of which is updated to be the same as the position of the CenterEyeAnchor
- nathan.bendichHonored Guest
+1 to what door144 said, a brief video tutorial would be great! Thanks!
- LordslimeballExplorer
Hey,
I hope that you have fixed the problem. If not - I assume that you are working with Unity - the Oculus Integration for unity has the OVRPlayerController Prefab, you need to drag it into your scene so that you can use the Oculus headset. Remove the OVRPlayerController script from this prefab. When you hit play another script will throw an error saying that it cannot find the OVRPlayerController script - remove the script that is throwing an error as well.
Now your scene camera should move correctly with your headset. Now you need to make objects move in sync with the CenterEyeAnchor. One way to do this is to simply add the objects as the children of the CenterEyeAnchor. I did NOT do this as this caused weird collision issues. So I created several objects and I update their position with the following script:
[SerializeField]
private Transform transformFromWhichToCopyPos;// Update is called once per frame
void Update()
{
transform.position = transformFromWhichToCopyPos.position;
}hope this helps, I do not think a video describing the solution for this problem is necessary, if you have any other questions let me know.
- door144Explorer
Lordslimeball, can you elaborate on the solution I am having the same issue?
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
- 1 year ago