Finch Logo

Documentation

PlayerState - class

Namespace: Finch

Description

Keeps last update frame controller data.

Fields

Modificator Type Name Description
static readonly BoneDictionary Bones The list of proceeding skeletal model bones
static readonly PlayerState Identity Identity state. All coordinates are zero, all rotations are identity, all buttons are unpressed
- FinchNodesState NodesState Nodes state
readonly UnityEngine.Quaternion[] Rotations Bones rotations
readonly UnityEngine.Vector3[] Positions Bones name joints positions.
readonly bool[] Avaliable Bone leading node avaliable
readonly float[] BonesLengths Bones lengths. Bones start from their name joint. For example, bone between elbow and wrist is LowerArm (Elbow) bone
readonly ushort[] ElementsBeginEvents Low-level representation of the BeginEvents. Correspondent bit value of array with chirality index is equal 1 at the first frame when condition is realized
readonly ushort[] ElementsState Low-level representation of the current FinchControllerElement state
readonly ushort[] ElementsEndEvents ow-level representation of the EndEvents. Correspondent bit value of array with chirality index is equal 1 at the first frame when condition is not realized
readonly bool[] IsTouching Touchpad state. Array element value is true, if touchpad element of correspondent chirality controller is touched, otherwise false
readonly UnityEngine.Vector2[] TouchAxes Touchpad elements touchposes
readonly float[] IndexTrigger IndexTriggers values
readonly float[] MiddleTrigger MiddleTriggers values
readonly bool[] CalibrationButtonPressed Array element value is true at the first frame when condition is realized
readonly UnityEngine.Vector3[] Gyro Local gyroscopes values
readonly UnityEngine.Vector3[] Accel Local accelerometer values
- string ErrorDetails An error message, if this error was occurred at the PlayerState receiving moment

Methods

Return type Name Arguments Description
UnityEngine.Quaternion GetRotation FinchBone bone Get bone rotation
UnityEngine.Vector3 GetPosition FinchBone bone Get bone position
bool GetAvaliable FinchBone bone Returns true, if bone leading node avaliable
UnityEngine.Vector3 GetBoneLength FinchBone bone Get bone length. Bones start from their name joint. For example, bone between elbow and wrist is LowerArm (Elbow) bone
void CopyFrom PlayerState other Fills this state by other PlayerState values