Camera orbit controls

Evelyn MccallEvelyn Mccall Posts: 13


I'm writing a plugin for linux users to use a 6-dof-space-mouse (like 3dConnection) in DAZ studio using the spacenavd driver.
The DAZ built-in plugin won't work in lunix with Crossover, Wine or PlayOnLinux.

My plugin is already working and I am able to smoothly control the main camera's rotation by changing DzCamera->getYRotControl()->setValue(x).

I would like to implement camera orbit as well.

Does anybody know how to get or calculate the camera's focal distance position in world space?

I hope that someone can point me in the right direction.

Post edited by Evelyn Mccall on


  • I've figured something out in the meantime.

    DzNode *focalDistancePosNode = new DzNode();MainCamera->addNodeChild(focalDistancePosNode);focalDistancePosNode->setLocalPos(DzVec3(focalDistancePosNode->getLocalPos().m_x, focalDistancePosNode->getLocalPos().m_x, -MainCamera->getFocalDistance()));

    I don't like the idea of adding a child to the camera in order to move the child along the z-axis at focal distance.

    Maybe there's a better way.

  • surrealsurreal Posts: 122

    I do recall the subject being raised before in this SDK forum, it may have been in regard to DzLight.

    However check out Praxis's script I think it will give you the information you need.

  • Evelyn MccallEvelyn Mccall Posts: 13
    edited March 2020

    Hey, thanks for your reply.

    I came across that script as well. It is great. It uses two points in space to do all the calculations unfortunately. 

    I don't have this second point. It's basically an offset of the camera's Z-Axis.

    So how can I calculate an offset position in z-axis' pointing direction of a node that has no parent like a camera?


    Post edited by Evelyn Mccall on
  • DzCamera::getFocalPoint()

  • Great. Thanks a million. 

  • Evelyn, how is your plugin going? I'm looking to write something similar for Windows, and I'm not seeing any references in the SDK docs about how to continually get data from an external source and set values on a camera inside of a "Device". In fact, it looks like the official documentation has only 11 lines of text referring to DzDevice, just very briefly mentioning getOptionsFrame and setSettings. Where does one look for this information?

    Thanks for any assistance,


Sign In or Register to comment.