The camera controller.
More...
#include <ParaScriptingScene.h>
|
static void | FollowObject (ParaObject obj) |
| set the character to follow. More...
|
|
static void | FollowObject (const char *strObjectName) |
| set the character to follow. More...
|
|
static void | FirstPerson (int nTransitionMode, float fHeight, float fAngle) |
| Set the current camera to follow a certain object, using first person view of the object. More...
|
|
static void | ThirdPerson (int nTransitionMode, float fHeight, float fFacing, float fAngle) |
| Set the current camera to follow a certain object, using Third Person view of the object, where character is always centered while allowing rotation around it from 360 degree angles,. More...
|
|
static void | Default (int nTransitionMode, float fHeight, float fAngle) |
| : Set the current camera to follow a certain object, using the default view of the object. More...
|
|
static void | Fixed (int nTransitionMode, float fX, float fY, float fZ) |
| Set the current camera to look at a certain object, from a fixed camera location while allowing rotation around it from 360 degree angles,. More...
|
|
static void | GetPosition (float *x, float *y, float *z) |
| get the world position of the camera eye. More...
|
|
static void | GetLookAtPosition (float *x, float *y, float *z) |
| get the position that the camera is currently looking at. More...
|
|
static void | SetKeyMap (int key, int scancode) |
| we can alter key map at runtime More...
|
|
static int | GetKeyMap (int key) |
| get scancode from key id
|
|
static ParaAttributeObject | GetAttributeObject () |
| get the attribute object associated with the current camera object. More...
|
|
static void | GetAttributeObject_ (ParaAttributeObject &output) |
| used for API exportation. More...
|
|
The camera controller.
First call FollowObject() method to set the character to follow. set call any of the camera transition functions to set the camera follow mode
§ Default()
void ParaScripting::ParaCamera::Default |
( |
int |
nTransitionMode, |
|
|
float |
fHeight, |
|
|
float |
fAngle |
|
) |
| |
|
static |
: Set the current camera to follow a certain object, using the default view of the object.
character restricted to move within a rectangular region, while camera is facing a fixed direction.
- Parameters
-
nTransitionMode | 1 (default) smooth move or 0 immediate move |
fHeight | relative camera height above the object. |
fAngle | camera lift up angle, this is usually Pi/4: 45 degrees |
§ FirstPerson()
void ParaScripting::ParaCamera::FirstPerson |
( |
int |
nTransitionMode, |
|
|
float |
fHeight, |
|
|
float |
fAngle |
|
) |
| |
|
static |
Set the current camera to follow a certain object, using first person view of the object.
- Parameters
-
nTransitionMode | 1 (default) smooth move or 0 immediate move |
fRadius | the distance from the person to the camera |
fAngle | camera lift up angle, this is usually Pi/4: 45 degrees |
§ Fixed()
void ParaScripting::ParaCamera::Fixed |
( |
int |
nTransitionMode, |
|
|
float |
fX, |
|
|
float |
fY, |
|
|
float |
fZ |
|
) |
| |
|
static |
Set the current camera to look at a certain object, from a fixed camera location while allowing rotation around it from 360 degree angles,.
- Parameters
-
nTransitionMode | 1 (default) smooth move or 0 immediate move |
fX | camera location: x |
fY | camera location: y |
fZ | camera location: z |
§ FollowObject() [1/2]
void ParaScripting::ParaCamera::FollowObject |
( |
ParaObject |
obj | ) |
|
|
static |
set the character to follow.
the object is also set as the current player
- Parameters
-
§ FollowObject() [2/2]
void ParaScripting::ParaCamera::FollowObject |
( |
const char * |
strObjectName | ) |
|
|
static |
set the character to follow.
the object must be global in order to be found by its name. It is also set as the current player currently,
- Parameters
-
strObjectName | the name of the object to follow |
§ GetAttributeObject()
get the attribute object associated with the current camera object.
§ GetAttributeObject_()
used for API exportation.
§ GetLookAtPosition()
void ParaScripting::ParaCamera::GetLookAtPosition |
( |
float * |
x, |
|
|
float * |
y, |
|
|
float * |
z |
|
) |
| |
|
static |
get the position that the camera is currently looking at.
§ GetPosition()
void ParaScripting::ParaCamera::GetPosition |
( |
float * |
x, |
|
|
float * |
y, |
|
|
float * |
z |
|
) |
| |
|
static |
get the world position of the camera eye.
This function takes no parameters. x,y,z are not input, but pure output. In the script, we can call it as below x,y,z = ParaCamera.GetPosition(); – get the camera's eye position in Luabind, it is defined as .def("GetPosition", &ParaCamera::GetPosition, pure_out_value(_1) + pure_out_value(_2) + pure_out_value(_3)) please note, y is the absolute position in world coordinate
- See also
- SetPosition(float x, float y, float z)
§ SetKeyMap()
void ParaScripting::ParaCamera::SetKeyMap |
( |
int |
key, |
|
|
int |
scancode |
|
) |
| |
|
static |
we can alter key map at runtime
- Parameters
-
key | CharacterAndCameraKeys . [0-10] |
scancode | DIK_A, DIK_D,DIK_W,DIK_S,DIK_Q,DIK_E,DIK_SPACE,0,0,DIK_INSERT,DIK_DELETE |
§ ThirdPerson()
void ParaScripting::ParaCamera::ThirdPerson |
( |
int |
nTransitionMode, |
|
|
float |
fHeight, |
|
|
float |
fFacing, |
|
|
float |
fAngle |
|
) |
| |
|
static |
Set the current camera to follow a certain object, using Third Person view of the object, where character is always centered while allowing rotation around it from 360 degree angles,.
- Parameters
-
nTransitionMode | 1 (default) smooth move or 0 immediate move |
fRadius | the distance from the person to the camera |
fFacing | camera facing, around the y axis, which is the world height axis. |
fAngle | camera lift up angle, this is usually Pi/4: 45 degrees |
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/ParaScriptBindings/ParaScriptingScene.h
- Client/trunk/ParaEngineClient/ParaScriptBindings/ParaScriptingScene.cpp