Skip to main content

RotationLimitWrapper

A class in Root.Township, Alta.Character.

Character component that applies a rotation limit to a bone (such as a wrist) every physics step, optionally falling back to the last rotation that was within the limit.

Constructors​

MemberWhat it is
RotationLimitWrapper()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private bool isCachingBoneRotationWhen true (the default), the last rotation inside the limit is kept and restored.
private Quaternion lastWristRotationThe last local rotation that needed no correction.
private RotationLimit rotationLimitBacking field for RotationLimit.

Properties​

MemberWhat it is
RotationLimit RotationLimit { get; set; }The rotation limit to apply.

Methods​

MemberWhat it is
override void FixedUpdateCharacterComponent()Applies the limit. With caching on, keeps the rotation if no correction was needed, otherwise puts back the last good one.

Used in​

Members of other types that take, return or hold a RotationLimitWrapper: