🪄Pheasy
Last updated
Last updated
Pheasy component handles physics constraints, collision/trigger detection and stability for a single Rigidbody.
Rb: Rigidbody that this Pheasy is attached to. This reference is automatically set in Awake function.
Center Of Mass: Transform that will be used as center of mass. If null, a Transform will be created representing the actual center of mass of the object.
Targets: List of constraints to which the Rigidbody is subjected.
Colliders: List of colliders of the Rigidbody.
Collision Notifier: Component responsible for detecting collisions witht he Rigidbody. If null, a CollisionNotifier will be created.
Trigger Notifiers: List of components responsible for handling triggers.
Safe Mode: If enabled, the following variables will be applied.
Gradual Mode: If enabled, when the joint is created, maximum forces in joint drives will grow with time until reaching their final values.
Max Velocity: Maximum velocity at which the Rigidbody can move. If greater, Rigidbody.velocity
will be clamped to this value.
Max Angular Velocity: Maximum angular velocity at which the Rigidbody can move. If greater, Rigidbody.angularVelocity
will be clamped to this value.
Max Depenetration Velocity: Maximum velocity at which the Rigidbody can move out of colliding state. This value will be assigned to Rigidbody.maxDepenetrationVelocity
.
Max Error Allowed: TargetConstraint.error
from which Rigidbody velocity will be set to 0. TargetConstraint.error
is the distance between TargetConstraint.anchor
and TargetConstraint.connectedAnchor
.
Ignore Collisions On Start: If enabled, Rigidbody will ignore collisions with Rigidbodies listed in Pheasy.relations
.
Relations: List of Rigidbodies (with Pheasy component attached) that are related to this Rigidbody.
Axis: Prefab that will be instantiated and moved to anchor and connected anchor of each target constraint.
Axis Scale: Value that will be applied to each local scale axis of the instantiated axes.
Edit Mode: If enabled, some constraint variables can change in runtime. This option may affect performance. The variables that could change in runtime are:
TargetConstraint.anchor.
TargetConstraint.connectedBody.
TargetConstraint.axis.
TargetConstraint.settings.linearMotion.
TargetConstraint.settings.angularMotion.
TargetConstraint.settings.motionDrive.
TargetConstraint.settings.angularDrive.
TargetConstraint.settings.collideWithConnectedRb.
TargetConstraint.keepAxisRelativeToObject.
Ignoring: List of colliders which collisions are being ignored.
On Init: Invoked when the Awake function of this Pheasy component is completed.