HandGrip.GripJoint
A class in Root.Township, Alta.Character.
One finger joint of a hand grip. It curls in steps until it touches a grabbed object, and blends between open, splayed, closed and saved poses.
- Listed in Players and characters
- Nested in
HandGrip - Derived types
HandGrip.ThumbGripJoint
Constructors
| Member | What it is |
|---|---|
GripJoint() | Creates a HandGrip.GripJoint from hand, joint, transform and rotations. |
GripJoint(HandGrip hand, HandGripConfiguration.Finger.Joint joint, Transform transform, HandGripConfiguration.RotationSnapshots rotations) | Creates a HandGrip.GripJoint from hand, joint, transform and rotations. |
Fields
| Member | What it is |
|---|---|
Matrix4x4 worldMatrix | The joint's world matrix, worked out while curling. |
protected float curlProgress | How far the joint has curled, in degrees. |
protected HandGrip hand | The hand grip this joint belongs to. |
protected HandGripConfiguration.Finger.Joint joint | The joint's configuration: length, radius, curl step and maximum curl. |
protected Matrix4x4 local | The joint's default local matrix. |
protected Matrix4x4 modifiedLocal | The local matrix after curling. |
protected Transform transform | The joint's bone transform. |
10 private and internal fields
Methods
| Member | What it is |
|---|---|
bool CheckCollision() | Checks whether the joint's box overlaps anything on the Active Tight Grip layer. |
bool CurlIn(int curl, Matrix4x4 parent, bool isBaseMost) | Curls the joint one more step if it can, then checks for contact. Returns whether it's touching. |
void LerpToSave(float time, float skeleton, float splaid, bool isSkeletal, bool canGestureGripping) | Blends the joint's rotation toward the saved grip pose, using the open and splayed poses when skeletal input is on. |
void OnDrawGizmos(Matrix4x4 parent) | Draws the joint's box, red when touching and green when not. |
virtual void PrepareCurl() | Resets the joint to its default pose before curling. |
void Save() | Stores the current curled rotation as the grip pose. |
void SerializeGrip(Stream stream) | Reads or writes how many curl steps the joint took, and rebuilds the pose when reading. |
Used in
Members of other types that take, return or hold a GripJoint: