Skip to main content
Up and Coming
April 17, 2013

Camera parented to object

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
    This topic has been closed for replies.

    11 replies

    Up and Coming
    April 17, 2013
    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.
    Inspiring
    April 17, 2013
    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.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    April 18, 2013
    It does not look like the unity sdk has been updated yet :P

    It looks like in the OVRCameraController, if you assign the transform variable FollowOrientation, It will follow the orientation of whatever you assign to it.
    digitalAuthor
    Up and Coming
    April 18, 2013
    "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?
    Up and Coming
    April 18, 2013
    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.
    digitalAuthor
    Up and Coming
    April 18, 2013
    "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.
    Up and Coming
    April 18, 2013
    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?
    Inspiring
    April 18, 2013
    Yeah, I would try the FollowOrientation variable and see if that does what you need.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    digitalAuthor
    Up and Coming
    April 18, 2013
    "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!
    August 20, 2013
    "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.