Motion capture
Classes#
TsAvatarSettings#
TsAvatarSettings
Properties
IsValid — bool (read-only)
Fields
m_avatar Avatar
m_armsTPoseToIPoseDegrees float
m_bones TsHumanBone[]
m_characterModel GameObject
Methods
OnValidate#
void OnValidate();
GetHumanDescription#
HumanDescription GetHumanDescription();
Returns: HumanDescription
GetCharacterModel#
GameObject GetCharacterModel(Avatar avatar);
Parameters
avatar: Avatar
Returns: GameObject
Setup#
void Setup();
InstantiateWithAvatarSettings#
GameObject InstantiateWithAvatarSettings(GameObject obj, HumanDescription desc);
Parameters
obj: GameObject
desc: HumanDescription
Returns: GameObject
GetTransformName#
string GetTransformName(TsHumanBoneIndex boneIndex);
Parameters
boneIndex: TsHumanBoneIndex
Returns: string
GetIPoseRotation#
Quaternion GetIPoseRotation(TsHumanBoneIndex boneIndex);
Parameters
boneIndex: TsHumanBoneIndex
Returns: Quaternion
GetTPosePosition#
Vector3 GetTPosePosition(TsHumanBoneIndex boneIndex);
Parameters
boneIndex: TsHumanBoneIndex
Returns: Vector3
AdjustTPoseToIPose#
Quaternion AdjustTPoseToIPose(TsHumanBoneIndex boneIndex, Quaternion quaternion);
Parameters
boneIndex: TsHumanBoneIndex
quaternion: Quaternion
Returns: Quaternion
TsHandAnimator#
TsHandAnimator
Properties
MotionProvider — TsMotionProvider (read-only)
Bones — Dictionary< TsHumanBoneIndex, Transform > (read-only)
Fields
yawOffset float
headingOffset float
rollOffset float
calibrate bool
m_motionProvider TsMotionProvider
m_avatarSettings TsHandAvatarSettings
m_bonesTransforms Dictionary< TsHumanBoneIndex, Transform >
m_initialPose Dictionary< TsHumanBoneIndex, Quaternion >
Methods
Start#
void Start();
SetupAvatarBones#
void SetupAvatarBones();
Update#
void Update();
Update#
void Update(ISkeleton skeleton);
Parameters
skeleton: ISkeleton
TryDoWithBone#
void TryDoWithBone(TsHumanBoneIndex boneIndex, Action< Transform > action);
Parameters
boneIndex: TsHumanBoneIndex
action: Action< Transform >
Calibrate#
void Calibrate();
TsHandAvatarSettings#
TsHandAvatarSettings
Fields
HandModel Transform
HandAvatar Avatar
HandFingers HandFinger[]
Side TsDeviceSide
useWrist bool
Methods
OnValidate#
void OnValidate();
TsHumanAnimator#
TsHumanAnimator
Fields
m_motionProvider TsMotionProvider
m_avatarSettings TsAvatarSettings
m_bonesTransforms Dictionary< TsHumanBoneIndex, Transform >
m_rootBone TsHumanBoneIndex
IPose bool
Methods
Start#
void Start();
SetupAvatarBones#
void SetupAvatarBones();
Update#
void Update();
Update#
void Update(ISkeleton skeleton);
Parameters
skeleton: ISkeleton
TryDoWithBone#
void TryDoWithBone(TsHumanBoneIndex boneIndex, Action< Transform > action);
Parameters
boneIndex: TsHumanBoneIndex
action: Action< Transform >
Calibrate#
void Calibrate();
TsLiveMotionProvider#
TsLiveMotionProvider
Properties
DeviceBehaviour — TsDeviceBehaviour (read-only)
Running — override bool (read-only)
Fields
m_deviceBehaviour TsDeviceBehaviour
m_mocap IMocap
Methods
Start#
void Start();
DeviceBehaviour_ConnectionStateChanged#
void DeviceBehaviour_ConnectionStateChanged(TsDeviceBehaviour deviceBehaviour, bool isConnected);
OnEnable#
void OnEnable();
OnDisable#
void OnDisable();
StartInternal#
void StartInternal();
StopInternal#
void StopInternal();
GetSkeleton#
override ISkeleton GetSkeleton(float time);
Parameters
time: float
Returns: override ISkeleton
Calibrate#
override void Calibrate();
Returns: override void
TsMotionProvider#
TsMotionProvider
TsMotionProvider component is used as a source of motion data in an abstract level.
Properties
Running — bool (read-only)
Gets Mocap running state.
Methods
GetSkeleton#
ISkeleton GetSkeleton(float time);
Gets Mocap skeleton model interface.
Parameters
time: float
For non-live mocap data providers time parameter can be used to get skeleton data by given timeframe
Returns: ISkeleton
ISkeletonMocap skeleton interface
Calibrate#
void Calibrate();
Calibrates skeleton model by known pose, depending on the device that provides the data.
Data structures#
HandFinger#
Fields
transform Transform
boneIndex TsHumanBoneIndex
TsHumanBone#
Fields
boneIndex TsHumanBoneIndex
boneName string
iPoseRotation Quaternion
tPoseRotation Quaternion
tPosePosition Vector3
