Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsRelativeJointDefinition

A joint definition used to specify properties when creating a PhysicsRelativeJoint.
Read time 2 minutesLast updated 12 days ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public struct PhysicsRelativeJointDefinition

Constructors

Constructor

Description

PhysicsRelativeJointDefinition()Create a default PhysicsRelativeJoint definition.
PhysicsRelativeJointDefinition(System.Boolean)Create a default PhysicsRelativeJoint definition.

Properties

Property

Description

angularVelocityThe desired angular velocity.
bodyAThe first body the joint constrains.
bodyBThe second body the joint constrains.
collideConnectedWhether the shapes on the pair of bodies can come into contact.
drawScaleControls the scaling of the joint drawing. Not all joints have scalable elements but those that do will use this scaling.
forceThresholdThe force threshold beyond which a joint event will be produced.
linearVelocityThe desired linear velocity.
localAnchorAThe local anchor frame constraint relative to bodyA's origin.
localAnchorBThe local anchor frame constraint relative to bodyB's origin.
maxForceThe maximum linear force, usually in newtons. A value of zero is a special case which turns the limit off.
maxTorqueThe maximum torque, usually in newton-meters. A value of zero is a special case which turns the limit off.
springAngularDampingThe spring angular damping. Use 1 for critical damping.
springAngularFrequencyThe spring angular frequency, in cycles per second. A value of zero is a special case which turns the angular spring off.
springLinearDampingThe spring linear damping. Use 1 for critical damping.
springLinearFrequencyThe spring linear frequency, in cycles per second. A value of zero is a special case which turns the linear spring off.
springMaxForceThe spring maximum linear force, usually in newtons. A value of zero is a special case which turns the force limit off.
springMaxTorqueThe spring maximum torque, usually in newton-meters. A value of zero is a special case which turns the torque limit off.
torqueThresholdThe torque threshold beyond which a joint event will be produced.
tuningDampingControls the joint stiffness damping, non-dimensional. Use 1 for critical damping.
tuningFrequencyControls the joint stiffness frequency, in cycles per second.
worldDrawingControls whether this joint is automatically drawn when the world is drawn.

Static Properties

Property

Description

defaultDefinitionCreate a default PhysicsRelativeJoint definition.