#include <cameraThird.h>
Public Member Functions | |
void | update (CCameraTarget &target) |
update the 3rd person camera position | |
Create methods | |
CCameraThird () | |
CCameraThird (CXMLNode &node) | |
Create a CCameraThird object using data from XML node. | |
Static Public Attributes | |
static const char * | m_kStrElm = "CameraThird" |
XML element string. | |
Protected Member Functions | |
void | check_collision (CCameraTarget &target) |
do collision detection | |
void | fade_target (CCameraTarget &target) |
fade the target if we are close | |
Protected Attributes | |
bool | bFadeTarget |
true: fade target entity when close | |
CRangeType | minMaxFade |
starting/ending distance values to preform a fade | |
bool | bUseTilt |
Use target's tilt value? | |
bool | bUseRoll |
Use target's roll value? | |
bool | bCollideLevel |
handle collision with level geometry | |
bool | bCollideEntities |
handle collisions with entities | |
unit | fSmoothing |
0-snap to position, 0.01 to 1.0 -percent distance covered to target | |
unit | fDist |
starting offset distance (can be modified) | |
CRangeType | minMaxDist |
min and max distance (if not set, no limit) | |
unit | fPan |
starting offset pan | |
CRangeType | minMaxPan |
min and max pan (if not set, no limit) | |
unit | fHeight |
starting offset height | |
CVector3D | vecTargetOffset |
starting target offset |
(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.
CCameraThird::CCameraThird | ( | CXMLNode & | node | ) |
void CCameraThird::check_collision | ( | CCameraTarget & | target | ) | [protected] |
do collision detection
trace from target to pos
void CCameraThird::fade_target | ( | CCameraTarget & | target | ) | [protected] |
fade the target if we are close
TODO: handle fading TODO: move up into cameraTarget class
get distance to target
adjust fade depending on range
unit CCameraThird::fSmoothing [protected] |
0-snap to position, 0.01 to 1.0 -percent distance covered to target
entry: "Smoothing" factor