API reference
API reference
Select your platform
No SDKs available
No versions available

OVRBoneCapsule Class

The bone capsule class tracks data related to capsule colliders that may or may not be created with a OVRSkeleton's OVRBone.
You may use this to control physics interactions with the OVRSkeleton in case the user requires collision-based interactions in a game or experience.

Constructors

OVRBoneCapsule ()
Standard constructor which leaves all fields uninitialized.
Signature
OVRBoneCapsule()
OVRBoneCapsule ( boneIndex , capsuleRigidBody , capsuleCollider )
Constructor that completely initializes the bone capsule instance.
You can source the bone index by iterating through the OVRSkeleton.Bones list.
Signature
OVRBoneCapsule(short boneIndex, Rigidbody capsuleRigidBody, CapsuleCollider capsuleCollider)
Parameters
boneIndex: short  The bone index of the OVRBone which this capsule matches to.
capsuleRigidBody: Rigidbody  Bone capsule's rigid body.
capsuleCollider: CapsuleCollider  Bone capsule's collider.

Properties

BoneIndex : short
[Get][Set]
The index of the bone that is associated with the current capsule.
When used with hand tracking, use to understand what part of the hand corresponds with this instance's capsule. This index matches the OVRPlugin.BoneCapsule.BoneIndex for the same OVRBone.
Signature
short BoneIndex
CapsuleCollider : CapsuleCollider
[Get][Set]
The capsule collider associated with the instance.
Use this to enable, disable or influence the collisions of the bone's capsule.
Signature
CapsuleCollider CapsuleCollider
CapsuleRigidbody : Rigidbody
[Get][Set]
The rigidbody of the capsule, which you can use to make the capsule kinematic or not.
Signature
Rigidbody CapsuleRigidbody

Methods

Cleanup ()
Cleans up physics-based objects associated with the OVRBone.
The capsule rigid body's GameObject is destroyed.
Signature
void Cleanup()
Returns
void