cancel
Showing results for 
Search instead for 
Did you mean: 

OVRPlayerController does not move with OVRCameraPrefab in Unity

Lordslimeball
Explorer

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

1 ACCEPTED SOLUTION

Accepted Solutions

Lordslimeball
Explorer

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

View solution in original post

6 REPLIES 6

Lordslimeball
Explorer

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

Lordslimeball, can you elaborate on the solution I am having the same issue? 

+1 to what door144 said, a brief video tutorial would be great!  Thanks!

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.

Anyways my game has been published on app lab:

 

https://www.oculus.com/experiences/quest/5097554840287261?ranking_trace=1826624514247285_50975548402...

 

I would really appreciate it if you guys could try it out and let me know what you think

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.