PhysicsTestMotionParameters3D
Provides parameters for bodyTestMotion(body:parameters:result:)
.
class PhysicsTestMotionParameters3D
By changing various properties of this object, such as the motion, you can configure the parameters for bodyTestMotion(body:parameters:result:)
.
Superclasses
class RefCounted
Base class for reference-counted objects.
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.
Type members
Instance members
var collideSeparationRay: Bool
If set to
true
, shapes of typePhysicsServer3D/ShapeType/shapeSeparationRay
are used to detect collisions and can stop the motion. Can be useful when snapping to the ground.var excludeBodies: VariantCollection<RID>
Optional array of body
RID
to exclude from collision. UsegetRid
to get theRID
associated with aCollisionObject3D
-derived node.var excludeObjects: VariantCollection<Int64>
Optional array of object unique instance ID to exclude from collision. See
getInstanceId
.var from: Transform3D
Transform in global space where the motion should start. Usually set to
globalTransform
for the current body’s transform.var margin: Double
Increases the size of the shapes involved in the collision detection.
var maxCollisions: Int32
Maximum number of returned collisions, between
1
and32
. Always returns the deepest detected collisions.var motion: Vector3
Motion vector to define the length and direction of the motion to test.
var recoveryAsCollision: Bool
If set to
true
, any depenetration from the recovery phase is reported as a collision; this is used e.g. byCharacterBody3D
for improving floor detection during floor snapping.