class PhysicsJoint
in global :: Sandbox . Physics
A physics constraint.
public PhysicsWorld World { get; }
The this joint belongs to.
public PhysicsBody Body1 { get; }
The source physics body this joint is attached to.
public PhysicsBody Body2 { get; }
The target physics body this joint is constraining.
public PhysicsPoint Point1 { get; set; }
A specific point this joint is attached at on
public PhysicsPoint Point2 { get; set; }
A specific point this joint is attached at on
public bool IsActive { get; set; }
Whether this constraint is active. (i.e. is enabled, is not broken)
public bool Collisions { get; set; }
Enables or disables collisions between the 2 constrained physics bodies.
public float Strength { get; set; }
Strength of the linear constraint. If it takes any more energy than this, it'll break.
public float AngularStrength { get; set; }
Strength of the angular constraint. If it takes any more energy than this, it'll break.
public static FixedJoint CreateFixed( PhysicsPoint a, PhysicsPoint b )
Creates an almost solid constraint between two physics bodies.
public static SpringJoint CreateLength( PhysicsPoint a, PhysicsPoint b, float maxLength )
Creates a constraint like a rope, where it has no minimum length but its max length is restrained.
public static SpringJoint CreateSpring( PhysicsPoint a, PhysicsPoint b, float minLength, float maxLength )
Creates a constraint that will try to stay the same length, like a spring, or a rod.
public static SliderJoint CreateSlider( PhysicsPoint a, PhysicsPoint b, float minLength, float maxLength )
Creates a slider constraint between two physics bodies via s.
public static BallSocketJoint CreateBallSocket( PhysicsBody body1, PhysicsBody body2, Vector3 origin )
Creates a ball socket constraint.
body1The source physics body.body2The target physics body to constrain to.originThe origin of the hinge in world coordinates. The 2 bodies will rotate around this point.- Returns The created ball socket joint.
public static BallSocketJoint CreateBallSocket( PhysicsPoint a, PhysicsPoint b )
Creates a ball socket constraint.
aThe source physics body.bThe target physics body to constrain to.- Returns The created ball socket joint.
public int GetHashCode( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public static PulleyJoint CreatePulley( PhysicsBody body1, PhysicsBody body2, Vector3 anchor1, Vector3 ground1, Vector3 anchor2, Vector3 ground2 )
😔 No documentation found.
public static SliderJoint CreateSlider( PhysicsBody body1, PhysicsBody body2, Vector3 origin1, Vector3 origin2, Vector3 axis, float minLength, float maxLength )
😔 No documentation found.
public static HingeJoint CreateHinge( PhysicsBody body1, PhysicsBody body2, Vector3 center, Vector3 axis )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public static HingeJoint CreateHinge( PhysicsPoint a, PhysicsPoint b )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public void remove_OnBreak( Action value )
😔 No documentation found.
public void add_OnBreak( Action value )
😔 No documentation found.
public static HingeJoint CreateHinge( PhysicsBody body1, PhysicsBody body2, Transform localFrame1, Transform localFrame2 )
😔 No documentation found.
public void Remove( )
😔 No documentation found.