PhysicsJointBuilderExtensionsclass

Fluent configuration methods shared by all physics joint builders.

objectPhysicsJointBuilderExtensions
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public static abstract sealed class Sandbox.PhysicsJointBuilderExtensions

Methods7

Showing 7 methods

public static T WithAngularStrength(T b, float v)PUBLICSTATIC

Sets the joint's breaking torque.

ParameterTypeDescription
bTThe joint builder.
vfloatThe maximum torque.
Returns:TThe joint builder.

public static T WithBody1(T b, int v)PUBLICSTATIC

Sets the first connected body.

ParameterTypeDescription
bTThe joint builder.
vintThe body index.
Returns:TThe joint builder.

public static T WithBody2(T b, int v)PUBLICSTATIC

Sets the second connected body.

ParameterTypeDescription
bTThe joint builder.
vintThe body index.
Returns:TThe joint builder.

public static T WithCollision(T b, bool v)PUBLICSTATIC

Sets whether the connected bodies can collide.

ParameterTypeDescription
bTThe joint builder.
vboolWhether collision is enabled.
Returns:TThe joint builder.

public static T WithFrame1(T b, Transform v)PUBLICSTATIC

Sets the joint frame in the first body's local space.

ParameterTypeDescription
bTThe joint builder.
vTransformThe local joint frame.
Returns:TThe joint builder.

public static T WithFrame2(T b, Transform v)PUBLICSTATIC

Sets the joint frame in the second body's local space.

ParameterTypeDescription
bTThe joint builder.
vTransformThe local joint frame.
Returns:TThe joint builder.

public static T WithLinearStrength(T b, float v)PUBLICSTATIC

Sets the joint's breaking force.

ParameterTypeDescription
bTThe joint builder.
vfloatThe maximum linear force.
Returns:TThe joint builder.

On this page