Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
JointType
PhysicalBone3D.swift:38enum JointType
Cases
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (24) members.
Types
Type members
Instance members
var angularDamp: Double
Damps the body’s rotation. By default, the body will use the Default Angular Damp in Project > Project Settings > Physics > 3d or any value override set by an
Area3D
the body is in. Depending onangularDampMode
, you can setangularDamp
to be added to or to replace the body’s damping value.var angularDampMode: PhysicalBone3D.DampMode
Defines how
angularDamp
is applied. SeeDampMode
for possible values.var angularVelocity: Vector3
The PhysicalBone3D’s rotational velocity in radians per second.
var bodyOffset: Transform3D
Sets the body’s transform.
var bounce: Double
The body’s bounciness. Values range from
0
(no bounce) to1
(full bounciness).var canSleep: Bool
If
true
, the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force.var customIntegrator: Bool
If
true
, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the_integrateForces(state:)
method, if that virtual method is overridden.var friction: Double
The body’s friction, from
0
(frictionless) to1
(max friction).var gravityScale: Double
This is multiplied by the global 3D gravity setting found in Project > Project Settings > Physics > 3d to produce the body’s gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
var jointOffset: Transform3D
Sets the joint’s transform.
var jointRotation: Vector3
Sets the joint’s rotation in radians.
var jointType: PhysicalBone3D.JointType
Sets the joint type. See
JointType
for possible values.var linearDamp: Double
Damps the body’s movement. By default, the body will use the Default Linear Damp in Project > Project Settings > Physics > 3d or any value override set by an
Area3D
the body is in. Depending onlinearDampMode
, you can setlinearDamp
to be added to or to replace the body’s damping value.var linearDampMode: PhysicalBone3D.DampMode
Defines how
linearDamp
is applied. SeeDampMode
for possible values.var linearVelocity: Vector3
The body’s linear velocity in units per second. Can be used sporadically, but don’t set this every frame, because physics may run in another thread and runs at a different granularity. Use
_integrateForces(state:)
as your process loop for precise control of the body state.var mass: Double
The body’s mass.
func applyCentralImpulse(Vector3
) func applyImpulse(Vector3, position: Vector3
) func getBoneId(
) -> Int32 func getSimulatePhysics(
) -> Bool func isSimulatingPhysics(
) -> Bool
Show implementation details (1)
Hide implementation details
func _integrateForces(state: PhysicsDirectBodyState3D?
) Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the
customIntegrator
property allows you to disable the standard force integration and do fully custom force integration for a body.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
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 RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.