Photon Quantum 2.1.1

Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
Quantum.Physics3D.DistanceJoint3D Struct Reference

A Joint3D that connects a Physics Body to an anchor and attempts to keep them a certain distance apart. The connected anchor can be a world-space position or another entity with at least a transform component. More...

Public Member Functions

 DistanceJoint3D (FP minDistance, FP maxDistance, EntityRef connectedEntity, FPVector3 anchor, FPVector3 connectedAnchor)
 Constructs a DistanceJoint3D struct. Use CreateJoint instead to create a Joint3D of type JointType3D.DistanceJoint. More...
 

Static Public Member Functions

static Joint3D CreateJoint (FP minDistance, FP maxDistance, EntityRef connectedEntity=default, FPVector3 anchor=default, FPVector3 connectedAnchor=default)
 Creates a Joint3D of type JointType3D.DistanceJoint. More...
 

Public Attributes

FPVector3 Anchor
 The anchor offset, in the local space of the joint entity transform. This is the point considered for the joint constraints and where the joint forces are applied. More...
 
FPVector3 ConnectedAnchor
 If the joint has a ConnectedEntity, this represents the anchor offset relative to it, in local space. Else, this is the position in world space considered as target anchor. More...
 
EntityRef ConnectedEntity
 A target entity that this joint might be connected to. If set to EntityRef.None, the ConnectedAnchor represents the target anchor position in world space. The connected entity must have at least a Transform3D component. If it also has a non-kinematic PhysicsBody3D, joint forces are also computed and applied to it. More...
 

Properties

FP MaxDistance [get, set]
 The maximum distance between the anchor points that the joint will attempt to maintain. If set to FP.UseableMax, allows any distance in the usable range above MinDistance. More...
 
FP MinDistance [get, set]
 The minimum distance between the anchor points that the joint will attempt to maintain. If set to zero or default, allows any distance below MaxDistance. More...
 

Detailed Description

A Joint3D that connects a Physics Body to an anchor and attempts to keep them a certain distance apart. The connected anchor can be a world-space position or another entity with at least a transform component.

Constructor & Destructor Documentation

◆ DistanceJoint3D()

Quantum.Physics3D.DistanceJoint3D.DistanceJoint3D ( FP  minDistance,
FP  maxDistance,
EntityRef  connectedEntity,
FPVector3  anchor,
FPVector3  connectedAnchor 
)
inline

Constructs a DistanceJoint3D struct. Use CreateJoint instead to create a Joint3D of type JointType3D.DistanceJoint.

Returns

Member Function Documentation

◆ CreateJoint()

static Joint3D Quantum.Physics3D.DistanceJoint3D.CreateJoint ( FP  minDistance,
FP  maxDistance,
EntityRef  connectedEntity = default,
FPVector3  anchor = default,
FPVector3  connectedAnchor = default 
)
inlinestatic

Creates a Joint3D of type JointType3D.DistanceJoint.

Parameters
minDistanceThe minimum distance between the anchor points that the joint will attempt to maintain. If set to zero or default, allows any distance below MaxDistance.
maxDistanceThe maximum distance between the anchor points that the joint will attempt to maintain. If set to FP.UseableMax, allows any distance in the usable range above MinDistance.
connectedEntityA target entity that this joint might be connected to. If set to EntityRef.None, the ConnectedAnchor represents the target anchor position in world space. The connected entity must have at least a Transform3D component. If it also has a non-kinematic PhysicsBody3D, joint forces are also computed and applied to it.
anchorThe anchor offset, in the local space of the joint entity transform. This is the point considered for the joint constraints and where the joint forces are applied.
connectedAnchorIf the joint has a ConnectedEntity, this represents the anchor offset relative to it, in local space. Else, this is the position in world space considered as target anchor.
Returns
A Joint3D of type JointType3D.DistanceJoint.

Member Data Documentation

◆ Anchor

FPVector3 Quantum.Physics3D.DistanceJoint3D.Anchor

The anchor offset, in the local space of the joint entity transform. This is the point considered for the joint constraints and where the joint forces are applied.

◆ ConnectedAnchor

FPVector3 Quantum.Physics3D.DistanceJoint3D.ConnectedAnchor

If the joint has a ConnectedEntity, this represents the anchor offset relative to it, in local space. Else, this is the position in world space considered as target anchor.

◆ ConnectedEntity

EntityRef Quantum.Physics3D.DistanceJoint3D.ConnectedEntity

A target entity that this joint might be connected to. If set to EntityRef.None, the ConnectedAnchor represents the target anchor position in world space. The connected entity must have at least a Transform3D component. If it also has a non-kinematic PhysicsBody3D, joint forces are also computed and applied to it.

Property Documentation

◆ MinDistance

FP Quantum.Physics3D.DistanceJoint3D.MinDistance
getset

The minimum distance between the anchor points that the joint will attempt to maintain. If set to zero or default, allows any distance below MaxDistance.

◆ MaxDistance

FP Quantum.Physics3D.DistanceJoint3D.MaxDistance
getset

The maximum distance between the anchor points that the joint will attempt to maintain. If set to FP.UseableMax, allows any distance in the usable range above MinDistance.