cancel
Showing results for 
Search instead for 
Did you mean: 

Character Camera Constraint not working properly

TwistedPairDeve
Explorer
In Unity for as long as I can remember there has always required a "Character Camera Constraint" component attached to the "OVRPlayerController" game object in order to keep the OVRPlayerController game object following the player camera utilizing the 6dof of the Oculus Quest . Ever since Oculus Intigration 12.0 was released It seems like they have changed how the Character Camera Constraint component works as it now required several other components to function without throwing any errors. Even with all of these components (Capsule Collider, Rigidbody, Simple Capsule with Stick Movement) the OVRPlayerController only rotates with the player camera, the position never changes. Does anyone know how to fix this problem/ how to get this to work, or does Oculus have to patch it?
5 REPLIES 5

Dairedos
Honored Guest
Found out fix. Just downloaded Oculus Integration asset v13.0 Had same issues, which I just fixed by rewriting "OVRPlayerController" script into older version. This version was missing major functions in script. You can distinguish between older and newer easily - by presence of 'Dynamic Height' checkbox (older). 

I'm not able to post here link directly, so just type into google something like "Locomotion/Scripts/CharacterCameraConstraint.cs" and you will find a lot of older scripts on Github.

CYB3R_Z3R0
Honored Guest
@Dairedos Did you rewrite the OVRPlayerController script or the CharacterCameraConstraintScript or both?

CYB3R_Z3R0
Honored Guest
Hi there, I rewrote both scripts and now it works. The OVRPlayer follows the camera so there is no problems! Thank you!

Is there any possibility to share the script?

Thanks!

 

-Jaco

 

https://github.com/peabnuts123/unity-oculus-leapmotion-driving/blob/master/Assets/Plugins/Oculus/Sam...

You can mix part of this code the the most recent version and use it with a CharacterController type of controller (you can be interested mostly in the "PreCharacterMovement()" function, so the chatanetrController follows the camera Rig checking collisions. It works pretty well.