Create new Camera

Hi.

I'm trying to create a new camera without success.

In DAZ Script IDE it works fine:

// Create a new camera
var oCam = new DzBasicCamera( );
oCam.setName( "Test Camera" );
 
// Add the camera to the scene
Scene.addNode( oCam );

 

DAZ SDK (from the documentation):

#include "dzcamera.h"

DzCamera *cam = new DzBasicCamera(DzCamera::PERSPECTIVE_CAMERA);

I cannot find DzBasicCamera in any of the SDK's header files.

Is there any other way to add a camera to the scene?

 

Comments

  • Very strange.

    After restarting Visual Studio if was able to include dzbasiccamera.

    #include "dzbasiccamera.h"

     

  • Richard HaseltineRichard Haseltine Posts: 69,988
    edited March 2020

    In the SDK version you need to add the camera to the scene, as you do in the scripting exampleu. You also miss naming the camera. Rob supplies an example:

    DzCamera* cam = new DzBasicCamera();
    cam->setName( "Test Camera" );
    dzScene->addNode( cam );

    edited as I can't read

    Post edited by Richard Haseltine on
Sign In or Register to comment.