camera_object
the methods for the camera object
set_position(x, y, z) | makes and changes the cameras position matrix to the given coordinates |
---|---|
set_rotation(...) | makes and changes the cameras rotation matrix to either euler angles or a quaternion |
lookat_transform(x, y, z, at_x, at_y, at_z) | allows you to have the camera look at specific point from a specific position |
set_transform(transform) | sets a custom transformation matrix to the camera |
fields | the fields stored in the camera object |
- set_position(x, y, z)Source
makes and changes the cameras position matrix to the given coordinates
Parameters
- x number the
x
position of the camera - y number the
y
position of the camera - z number the
z
position of the camera
Returns
- camera the used camera object used for tailing methods
- x number the
- set_rotation(...)Source
makes and changes the cameras rotation matrix to either euler angles or a quaternion
Parameters
- euler_x number the rotation around the x axis in degrees
- euler_y number the rotation around the y axis in degrees
- euler_z number the rotation around the z axis in degrees
Or
- quat_x number the x position of the rotation direction vector
- quat_y number the y position of the rotation direction vector
- quat_z number the z position of the rotation direction vector
- vec_rot number the rotation around the direction vector in degrees
Returns
- camera the used camera object used for tailing methods
- lookat_transform(x, y, z, at_x, at_y, at_z)Source
allows you to have the camera look at specific point from a specific position
Parameters
- x number the
x
coordinate of the camera - y number the
y
coordinate of the camera - z number the
z
coordinate of the camera - at_x number the
x
coordinate of the point the camera should look at - at_y number the
y
coordinate of the point the camera should look at - at_z number the
z
coordinate of the point the camera should look at
- x number the
- set_transform(transform)Source
sets a custom transformation matrix to the camera
Parameters
- transform table the matrix to use as the camera transform
- fieldsSource
the fields stored in the camera object
rotation the cameras rotation matrix position the cameras translation matrix transform the optional transformation matrix