cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with OVR Player Controller

markfrancombe
Honored Guest
Hi!
Not sure what has happened, but I was simly droppping the OVR Player Controller into my scene and it worked right outta the box. INCLUDING, pysics (I have doors with unity hinge joints, it could open them)

But now, although it does bump into colliders, it wont push anything...
BUT then I notice, in the console.. all this...
xcqdlgnptcfq.jpg
Im 99% certain it wasnt there before... I have reimported the asset to see if it did anything...nope... can some programmery person tell me what its missing here?
12 REPLIES 12

delphinius81
Rising Star
Do you have an OVRManager anywhere in your scene? A lot of the OVR* scripts expect that there is an OVRManager to reference. In fact, the error that shows up is on a function call to OVRManager, so most likely that is the problem.

VRising
Honored Guest
Can you tell me what folder the OVR Player controller is in?

delphinius81
Rising Star
OVR/Prefabs/OVRPlayerController.prefab

vrdaveb
Oculus Staff
Looks like @delphinius81 is right - you need to add an OVRManager.cs to your scene. You can just drag it onto the same GameObject as your OVRCameraRig or use one of the prefabs. Unfortunately, the error checking in OVRCameraRig isn't great. In the future we'll make this easier to figure out or avoid.

markfrancombe
Honored Guest
Checked! Yes OVRManager IS in the scene. it was already attached to the OVRCamerRig
t9uhsjo4p45b.jpg

markfrancombe
Honored Guest
OK, figured out the errors. MY BAD!
I was first working on PC with oculus runtime installed.. no errors, but had switch to a mac for the modelling... i guess OVR stuff needs the runtime/sdk installed cos when I installed the Legacy runtime onto the mac the errors went away.

Final question however, is why physics isnt working. Again.. im not 100% sure it ever did, but I think so... 

vrdaveb
Oculus Staff
physics isnt working.

OVRPlayerController is just a script layered on top of Unity's normal character controller. That doesn't respond to physics. You can add a Rigidbody (mark it kinematic!) to have it affect other Rigidbody components in the world.

markfrancombe
Honored Guest
Hi, 
Thanks, but, yes, and thats exactly what I have done. I even compared with the Unity Character Controller (the NON rigid body one) I added rigid body to both OVRPlayerController and the Unity standard assets Char Controller . The Unity one opens doors and pushes spheres around, the Oculus one does not... just dont get it!

M

vrdaveb
Oculus Staff
Make sure the Rigidbody is on the same GameObject as the Capsule Collider and is marked kinematic.