PhysicsRayQueryParameters3D
Provides parameters for intersectRay(parameters:)
.
class PhysicsRayQueryParameters3D
By changing various properties of this object, such as the ray position, you can configure the parameters for intersectRay(parameters:)
.
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
static func create(from: Vector3, to: Vector3, collisionMask: UInt32, exclude: VariantCollection<RID>
) -> PhysicsRayQueryParameters3D? Returns a new, pre-configured
PhysicsRayQueryParameters3D
object. Use it to quickly create query parameters using the most common options.class var godotClassName: StringName
Instance members
var collideWithAreas: Bool
If
true
, the query will takeArea3D
s into account.var collideWithBodies: Bool
If
true
, the query will takePhysicsBody3D
s into account.var collisionMask: UInt32
The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See Collision layers and masks in the documentation for more information.
var exclude: VariantCollection<RID>
The list of object
RID
s that will be excluded from collisions. UsegetRid
to get theRID
associated with aCollisionObject3D
-derived node.var from: Vector3
The starting point of the ray being queried for, in global coordinates.
var hitBackFaces: Bool
If
true
, the query will hit back faces with concave polygon shapes with back face enabled or heightmap shapes.var hitFromInside: Bool
If
true
, the query will detect a hit when starting inside shapes. In this case the collision normal will beVector3(0, 0, 0)
. Does not affect concave polygon shapes or heightmap shapes.var to: Vector3
The ending point of the ray being queried for, in global coordinates.