All Classes Namespaces Functions Variables Enumerations Properties Pages
Classes | Public Member Functions | Public Attributes | Properties | List of all members
IKSolverVR Class Reference

Hybrid IK solver designed for mapping a character to a VR headset and 2 hand controllers More...

Inheritance diagram for IKSolverVR:
Inheritance graph
[legend]
Collaboration diagram for IKSolverVR:
Collaboration graph
[legend]

Classes

class  Arm
 4-segmented analytic arm chain. More...
 
class  BodyPart
 A base class for all IKSolverVR body parts. More...
 
class  Leg
 4-segmented analytic leg chain. More...
 
class  Spine
 Spine solver for IKSolverVR. More...
 

Public Member Functions

void SetToReferences (VRIK.References references)
 Sets this VRIK up to the specified bone references. More...
 
void GuessHandOrientations (VRIK.References references, bool onlyIfZero)
 Guesses the hand bones orientations ('Wrist To Palm Axis' and "Palm To Thumb Axis" of the arms) based on the provided references. if onlyIfZero is true, will only guess an orientation axis if it is Vector3.zero. More...
 
void DefaultAnimationCurves ()
 Set default values for the animation curves if they have no keys. More...
 
void AddPositionOffset (PositionOffset positionOffset, Vector3 value)
 Adds position offset to a body part. Position offsets add to the targets in VRIK. More...
 
void AddRotationOffset (RotationOffset rotationOffset, Vector3 value)
 Adds rotation offset to a body part. Rotation offsets add to the targets in VRIK More...
 
void AddRotationOffset (RotationOffset rotationOffset, Quaternion value)
 Adds rotation offset to a body part. Rotation offsets add to the targets in VRIK More...
 
void AddPlatformMotion (Vector3 deltaPosition, Quaternion deltaRotation, Vector3 platformPivot)
 Call this in each Update if your avatar is standing on a moving platform More...
 
void Reset ()
 Resets all tweens, blendings and lerps. Call this after you have teleported the character. More...
 
override void StoreDefaultLocalState ()
 Stores the default local state for the bones used by the solver. More...
 
override void FixTransforms ()
 Fixes all the Transforms used by the solver to their initial state. More...
 
override IKSolver.Point[] GetPoints ()
 Gets all the points used by the solver. More...
 
override IKSolver.Point GetPoint (Transform transform)
 Gets the point with the specified Transform. More...
 
override bool IsValid (ref string message)
 Determines whether this instance is valid or not. If returns false, also fills in an error message. More...
 
- Public Member Functions inherited from IKSolver
bool IsValid ()
 Determines whether this instance is valid or not. More...
 
void Initiate (Transform root)
 Initiate the solver with specified root Transform. Use only if this IKSolver is not a member of an IK component. More...
 
void Update ()
 Updates the IK solver. Use only if this IKSolver is not a member of an IK component or the IK component has been disabled and you intend to manually control the updating. More...
 
virtual Vector3 GetIKPosition ()
 Gets the IK position. NOTE: You are welcome to read IKPosition directly, this method is here only to match the Unity's built in IK API. More...
 
void SetIKPosition (Vector3 position)
 Sets the IK position. NOTE: You are welcome to set IKPosition directly, this method is here only to match the Unity's built in IK API. More...
 
float GetIKPositionWeight ()
 Gets the IK position weight. NOTE: You are welcome to read IKPositionWeight directly, this method is here only to match the Unity's built in IK API. More...
 
void SetIKPositionWeight (float weight)
 Sets the IK position weight. NOTE: You are welcome to set IKPositionWeight directly, this method is here only to match the Unity's built in IK API. More...
 
Transform GetRoot ()
 Gets the root Transform. More...
 
delegate void UpdateDelegate ()
 Delegates solver update events. More...
 
delegate void IterationDelegate (int i)
 Delegates solver iteration events. More...
 

Public Attributes

int LOD = 0
 LOD 0: Full quality solving. LOD 1: Shoulder solving, stretching plant feet disabled, spine solving quality reduced. This provides about 30% of performance gain. LOD 2: Culled, but updating root position and rotation if locomotion is enabled. More...
 
float scale = 1f
 Scale of the character. Value of 1 means normal adult human size. More...
 
bool plantFeet = true
 If true, will keep the toes planted even if head target is out of reach, so this can cause the camera to exit the head if it is too high for the model to reach. Enabling this increases the cost of the solver as the legs will have to be solved multiple times. More...
 
Spine spine = new Spine()
 The spine solver. More...
 
Arm leftArm = new Arm()
 The left arm solver. More...
 
Arm rightArm = new Arm()
 The right arm solver. More...
 
Leg leftLeg = new Leg()
 The left leg solver. More...
 
Leg rightLeg = new Leg()
 The right leg solver. More...
 
Locomotion locomotion = new Locomotion()
 Procedural leg shuffling for stationary VR games. Not designed for roomscale and thumbstick locomotion. For those it would be better to use a strafing locomotion blend tree to make the character follow the horizontal direction towards the HMD by root motion or script. More...
 
- Public Attributes inherited from IKSolver
Vector3 IKPosition
 The IK position. More...
 
float IKPositionWeight = 1f
 The IK position weight or the master weight of the solver. More...
 
UpdateDelegate OnPreInitiate
 Called before initiating the solver. More...
 
UpdateDelegate OnPostInitiate
 Called after initiating the solver. More...
 
UpdateDelegate OnPreUpdate
 Called before updating. More...
 
UpdateDelegate OnPostUpdate
 Called after writing the solved pose More...
 

Properties

VirtualBone rootBone [get, set]
 Gets the root bone. More...
 
- Properties inherited from IKSolver
bool initiated [get, set]
 Gets a value indicating whether this IKSolver has successfully initiated. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IKSolver
static Transform ContainsDuplicateBone (Bone[] bones)
 Checks if an array of objects contains any duplicates. More...
 

Detailed Description

Hybrid IK solver designed for mapping a character to a VR headset and 2 hand controllers

Hybrid IK solver designed for mapping a character to a VR headset and 2 hand controllers.