Client Scripting API - Camera

From Multiverse

Jump to: navigation, search

Camera is a class in the Client Scripting API that represents a view into the 3D scene.

Contents

Constructor

None. Access the main camera by calling ClientAPI.GetPlayerCamera().

In future releases you will be able to create additional cameras.

Methods

Dispose

Dispose()

Remove the Camera from the scene. You should not call this method on the player camera.

Returns

None

Parameters

None

LookAt

LookAt(location)

Turn the camera to look at the given location.

Returns

None

Parameters

Parameter Datatype Default Value Description
location Vector3 None The location in world space to look at.


Pitch

Pitch(degrees)

Rotate the camera around the X axis.

Returns

None

Parameters

Parameter Datatype Default Value Description
degrees float None The number of degrees to rotate the camera.

Roll

Roll(degrees)

Rotate the camera around the Z axis.

Returns

None

Parameters

Parameter Datatype Default Value Description
degrees float None The number of degrees to rotate the camera.

Yaw

Yaw(degrees)

Rotate the camera around the Y axis.

Returns

None

Parameters

Parameter Datatype Default Value Description
degrees float None The number of degrees to rotate the camera.

Properties

Property Datatype Description
Position Vector3 The location of the camera in the scene, or its location relative to its parent SceneNode, if it is attached to a SceneNode.
DerivedPosition Vector3 The location of the camera in the world.
Direction Vector3 The direction that the camera points. If the camera is attached to a SceneNode, then Direction is relative to the SceneNode.
DerivedDirection Vector3 The absolute direction of the camera in the world.
Orientation Quaternion The orientation of the camera. If the camera is attached to a SceneNode, then Orientation is relative to the SceneNode.
DerivedOrientation Quaternion The absolute orientation of the camera in the world.
Up Vector3 The upward direction from the point of view of the camera. If the camera is attached to a SceneNode, then Up is relative to the SceneNode.
DerivedUp Vector3 The absolute upward direction of the camera in the world.
Right Vector3 The right direction from the point of view of the camera. If the camera is attached to a SceneNode, then Right is relative to the SceneNode.
DerivedRight Vector3 The absolute right direction of the camera in the world.
AutoTrackingTarget SceneNode If you set this property, the camera will automatically point towards the given SceneNode.
AutoTrackingOffset Vector3 If set, this property applies an offset to the position of the AutoTrackingTarget when automatically pointing the camera.
Near float The distance from the camera's location to the near clipping plane.
Far float The distance from the camera's location to the far clipping plane.
AspectRatio float The aspect ratio of the camera.
FieldOfView float The field of view in degrees of the camera.
ProjectionType ClientAPI.Camera.Projection The projection type for the camera. Valid values are:
  • ClientAPI.Camera.Projection.Orthographic
  • ClientAPI.Camera.Projection.Perspective
Personal tools