FrictionJoint
Declaration
public class tainicom.Aether.Physics2D.Dynamics.Joints.FrictionJoint
Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
Inherits: tainicom.Aether.Physics2D.Dynamics.Joints.Joint
Constructors
FrictionJoint
Constructor for FrictionJoint.
void FrictionJoint(Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates = false)
Parameters:
| Name | Type | Description |
|---|---|---|
bodyA |
tainicom.Aether.Physics2D.Dynamics.Body |
|
bodyB |
tainicom.Aether.Physics2D.Dynamics.Body |
|
anchor |
Strawberry.Math.Vector2 |
|
useWorldCoordinates |
System.Boolean = false |
Set to true if you are using world coordinates as anchors. |
Properties
LocalAnchorA
The local anchor point on BodyA
Vector2 LocalAnchorA { get set }
LocalAnchorB
The local anchor point on BodyB
Vector2 LocalAnchorB { get set }
WorldAnchorA override
Vector2 WorldAnchorA { get set }
WorldAnchorB override
Vector2 WorldAnchorB { get set }
MaxForce
The maximum friction force in N.
float MaxForce { get set }
MaxTorque
The maximum friction torque in N-m.
float MaxTorque { get set }
Methods
GetReactionForce override
Vector2 GetReactionForce(float invDt)
Parameters:
| Name | Type | Description |
|---|---|---|
invDt |
System.Single |
GetReactionTorque override
float GetReactionTorque(float invDt)
Parameters:
| Name | Type | Description |
|---|---|---|
invDt |
System.Single |