Using a spherical polygon to limit the range of rotation on universal and ball-and-socket joints. A reach cone is specified as a spherical polygon on the surface of a a reach sphere that defines all positions the longitudinal segment axis beyond the joint can take. More...
Public Member Functions | |
void | SetLimitPoints (LimitPoint[] points) |
Sets the limit points and recalculates the reach cones. More... | |
Public Member Functions inherited from RotationLimit | |
void | SetDefaultLocalRotation () |
Map the zero rotation point to the current local rotation of this gameobject. More... | |
void | SetDefaultLocalRotation (Quaternion localRotation) |
Map the zero rotation point to the specified rotation. More... | |
Quaternion | GetLimitedLocalRotation (Quaternion localRotation, out bool changed) |
Returns the limited local rotation. More... | |
bool | Apply () |
Apply the rotation limit to transform.localRotation. Returns true if the limit has changed the rotation. More... | |
void | Disable () |
Disable this instance making sure it is initiated. Use this if you intend to manually control the updating of this Rotation Limit. More... | |
Public Attributes | |
float | twistLimit = 180 |
Limit of twist rotation around the main axis. More... | |
int | smoothIterations = 0 |
The number of smoothing iterations applied to the polygon. More... | |
Public Attributes inherited from RotationLimit | |
Vector3 | axis = Vector3.forward |
The main axis of the rotation limit. More... | |
Using a spherical polygon to limit the range of rotation on universal and ball-and-socket joints. A reach cone is specified as a spherical polygon on the surface of a a reach sphere that defines all positions the longitudinal segment axis beyond the joint can take.
This class is based on the "Fast and Easy Reach-Cone Joint Limits" paper by Jane Wilhelms and Allen Van Gelder. Computer Science Dept., University of California, Santa Cruz, CA 95064. August 2, 2001 http://users.soe.ucsc.edu/~avg/Papers/jtl.pdf