Create new Camera
Evelyn Mccall
Posts: 13
Hi.
I'm trying to create a new camera without success.
In DAZ Script IDE it works fine:
// Create a new cameravar oCam = new DzBasicCamera( );oCam.setName( "Test Camera" ); // Add the camera to the sceneScene.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.
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:
edited as I can't read
May I know where dzScene is initialized ?
I am aware this is a global parameter, but my program is dying once it executes dzScene to do anything, and in the debugger, I found that its address is zero.
By the way, I am playing SDK sapmle SceneLoaderApp.
Thanks.
Hi Tony,
Read this thread https://www.daz3d.com/forums/discussion/comment/4949771/#Comment_4949771
Hopefully it will help you understanding the SceneLoaderApp and why you are having problems.