Character Viewer

Scripting with the CharacterViewer class.

The CharacterViewer class provides logic for viewing a character in the UI.

Fields & Properties

Name
Description
Type
Access

cam

The character view camera.

Camera

public

startingRotation

The starting rotation.

Vector2

public

isResetting

If the object's rotation is resetting.

bool

public

onRotationChanged

A callback for when the rotation changes.

Action

public

IsInStartingRotation

If the object has not rotated away from the starting rotation.

bool

public

Render

The rendered texture.

RenderTexture

public

Rotate

Rotating requires a Vector2 that represents the new rotation. The Rotate method essentially sets the new view rotation.

myCharacterViewer.Rotate(myVector2);

Reset Rotation

Use ResetRotation to reset the rotation over a small period of time.

myCharacterViewer.ResetRotation();

Last updated