PathEngine home previous: iTestBed::setCameraControlState()next: iTestBed::setColour()
Contents, API Reference, Interfaces, iTestBed, setCameraControlTarget

iTestBed::setCameraControlTarget()

Description

Supply a target position that can be used to adjust camera target distance during camera control interactions, for more intuitive behaviour.

Syntax

void setCameraControlTarget(float x, float y, float z);

Parameters

x X coordinate of the control target position (in world space).
y Y coordinate of the control target position (in world space).
z Z coordinate of the control target position (in world space).

Remarks

Calling this method is optional, and camera control states work whether or not this method is called, but this method enables tweaks in the camera control code that avoid the camera target moving away from actual world geometry after repeated pan and zoom operations, which makes camera control a lot more intuitive.

Camera control target information is only useful when you are setting a camera control mode other than PE_CameraControl_None, with iTestBed::setCameraControlState(). If you are not calling setCameraControlState(), or if the state is being set to PE_CameraControl_None then camera control target information will not be used, and you should avoid any effort calculating a target position.

The purpose of the target position is to give a hint about distance to geometry of interest. In the example projects, world positions under the mouse curser are calculated and used for this purpose, but other positions could also conceivably be used.

C# Mapping

void setCameraControlTarget(float x, float y, float z);

Java Mapping

void setCameraControlTarget(float x, float y, float z);

Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: iTestBed::setColour()