ConeTwistJoint3D
A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint.
ConeTwistJoint3D.swift:11class ConeTwistJoint3D
A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. The twist axis is initiated as the X axis of the ConeTwistJoint3D
. Once the physics bodies swing, the twist axis is calculated as the middle of the X axes of the joint in the local space of the two physics bodies. Useful for limbs like shoulders and hips, lamps hanging off a ceiling, etc.
Superclasses
class Joint3D
Abstract base class for all 3D physics joints.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
Type members
Instance members
var bias: Double
The speed with which the swing or twist will take place.
var relaxation: Double
Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
var softness: Double
The ease with which the joint starts to twist. If it’s too low, it takes more force to start twisting the joint.
var swingSpan: Double
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
var twistSpan: Double
Twist is the rotation around the twist axis, this value defined how far the joint can twist.