cancel
Showing results for 
Search instead for 
Did you mean: 

Move player object with oculus camera

spvn
Honored Guest
I have the OVRCamera as a child object of my player object. I'm creating an "on-rails" game so the player is just moving forward (but has left and right strafing control). I'm trying to make it so that the player's collider will move along with the oculus's positional tracking.

Something similar to the Bullet Evasion demo, whereby bullets flying at my player's head should miss if he dodges his head to the left or right. But my camera is currently moving independently of the player object.

Any advice on how to match them up so that I can get a similar effect to the Bullet Evasion demo (https://share.oculus.com/app/bulletevasion)? Thanks
2 REPLIES 2

rolsct
Honored Guest
I've not tried this demo, but why don't you simply set up your trigger collider to the "center anchor" (or something like this) gameobject of the oculus player prefab ?

spvn
Honored Guest
Unfortunately I don't have my oculus with me right now, but if I remember correctly, doesnt the default player controller prefab have this problem as well? The camera can be moved "out" of the player due to the positional tracking. So the collider still won't match with the camera position?