cancel
Showing results for 
Search instead for 
Did you mean: 

Camera parented to object

digital
Explorer
Hi:

I just sat down to give the OVR libs a go. For some reason if I parent the OVRCameraController to an object, it tracks the position just fine, but does not follow the objects rotation.

Is there an easy way to resolve this issue?

Kind Regards:


John
11 REPLIES 11

judah4
Honored Guest
I did this a while ago. Either edit that script or use another one to reference the ovrcameracontroller and assign a rotation variable in it to the desired rotation that you which I assume is the parent object. I dint have my computer with me right now with the code but I can show what I did later if no one else does. There is also an example in the player controller prefab.

cybereality
Grand Champion
This issue has come up before. I thought it was fixed, but maybe it hasn't been published yet.

I will see if we can get this in the next release. Thanks.

judah4
Honored Guest
It does not look like the unity sdk has been updated yet 😛

It looks like in the OVRCameraController, if you assign the transform variable FollowOrientation, It will follow the orientation of whatever you assign to it.

digital
Explorer
"cybereality" wrote:
This issue has come up before. I thought it was fixed, but maybe it hasn't been published yet.

I will see if we can get this in the next release. Thanks.


Thanks Cyber... Is there an ETA on this?

robotloveskitty
Honored Guest
I was having this issue, but then I just set the neck offset to 0, and set the OVRCam to the position on the object where the neck should go.

rotates fine now 🙂

What was happening was, the body was pivoting around the x and z axis, but the neck was still projected off from the center position.

digital
Explorer
"robotloveskitty" wrote:
I was having this issue, but then I just set the neck offset to 0, and set the OVRCam to the position on the object where the neck should go.

rotates fine now 🙂

What was happening was, the body was pivoting around the x and z axis, but the neck was still projected off from the center position.


I still want the neck to be taken into account. Basically its so I can place the camera inside some form of vehicle. I still want head-tracking rotation, but parented to an object that can also rotate.

robotloveskitty
Honored Guest
The neck still works, this is just the neck offset amount. As far as I can tell, this is where the neck starts, not the length of the neck.

Oh! and did you assign the "Follow Orientation" transform?

cybereality
Grand Champion
Yeah, I would try the FollowOrientation variable and see if that does what you need.

digital
Explorer
"cybereality" wrote:
Yeah, I would try the FollowOrientation variable and see if that does what you need.


Ill use that for now. But I think it would be nice not to have to do this. It's not entirely intuitive.

Thanks again Cyber!