PhysicsHandSkeleton

Public properties

HandBoneKeyedSparseReadOnlyCollection<PhysicsHandBone> PhysicsBones { get; }

  • Collection of PhysicsHandBones added to the PhysicsHandSkeleton. This list is pretty much the same as the Bones list inherited by base HandSkeleton, only its items are strongly typed as PhysicsHandBones instead of HandBones

Protected methods

override HandBone CreateBone(GameObject boneObject)

  • PhysicsHandSkeleton's override of the base HandSkeleton's method that adds a HandBone to the specified GameObject

  • If the specified object does not have a PhysicsHandBone already attached, PhysicsHandSkeleton attaches RigidBodyHandBone to it

override void BoneAdded(HandBone bone, int index)

  • Adds the specified HandBone to the PhysicsBones list as the PhysicsHandBone

override void BoneRemoved(HandBone bone, int removedAtIndex)

  • Removes the specified hand bone from the PhysicsBones list

virtual void OnEndFixedUpdate()

  • This method is called at the end of Unity's fixed time step phase after the internal physics simulation step has been performed

  • To be precise it gets called every frame from the coroutine that uses WaitForFixedUpdate and according to the Unity's callback execution order this is executed at the end of the fixed update after the physics simulation step

  • PhysicsHandSkeleton uses this method to send out the OnPoseUpdated event defined in the base HandSkeleton, since the physics engine has updated the PhysicsHandSkeleton's Transform and the skeleton's PhysicsHandBones' Transforms at this point

void StartEndFixedUpdateCoroutine()

  • Starts the coroutine that repeatedly calls OnEndFixedUpdate method. This method is called by the PhysicsHandSkeleton when it is enabled

void StopEndFixedUpdateCoroutine()

  • Stops the coroutine that repeatedly calls OnEndFixedUpdate method. This method is called by the PhysicsHandSkeleton whenever it gets disabled/deactivated

override void Reset()

  • Unity built-in callback. Checks and ensures the physics skeleton's state is valid

override void OnValidate()

  • Unity built-in callback. Checks and ensures the physics skeleton's state is valid

override void Awake()

  • Unity built-in callback. Checks and ensures the physics skeleton's state is valid

virtual void OnEnable()

  • Unity built-in callback. Starts the coroutine that repeatedly calls OnEndFixedUpdate method

virtual void OnDisable()

  • Unity built-in callback. Stops the coroutine that repeatedly calls OnEndFixedUpdate method

virtual void FixedUpdate()

  • Updates the pose of the PhysicsHandSkeleton

Last updated