Instance Propertymigueldeicaza.swiftgodot 0.45.0SwiftGodot
jointRotation
Sets the joint’s rotation in radians.
PhysicalBone3D.swift:85final var jointRotation: Vector3 { get set }
Other members in extension
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
, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the_integrateForces(state:)
function, if defined.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 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 works in addition to the usual physics behavior, but the
customIntegrator
property allows you to disable the default behavior and do fully custom force integration for a body.