Class PhysicsRayQueryParameters3D
- Namespace
- Godot
- Assembly
- GodotSharp.dll
By changing various properties of this object, such as the ray position, you can configure the parameters for IntersectRay(PhysicsRayQueryParameters3D).
public class PhysicsRayQueryParameters3D : RefCounted, IDisposable
- Inheritance
-
PhysicsRayQueryParameters3D
- Implements
- Inherited Members
Constructors
PhysicsRayQueryParameters3D()
public PhysicsRayQueryParameters3D()
Properties
CollideWithAreas
If true
, the query will take Area3Ds into account.
public bool CollideWithAreas { get; set; }
Property Value
CollideWithBodies
If true
, the query will take PhysicsBody3Ds into account.
public bool CollideWithBodies { get; set; }
Property Value
CollisionMask
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.
public uint CollisionMask { get; set; }
Property Value
Exclude
The list of object Rids that will be excluded from collisions. Use GetRid() to get the Rid associated with a CollisionObject3D-derived node.
public Array<Rid> Exclude { get; set; }
Property Value
From
The starting point of the ray being queried for, in global coordinates.
public Vector3 From { get; set; }
Property Value
HitBackFaces
If true
, the query will hit back faces with concave polygon shapes with back face enabled or heightmap shapes.
public bool HitBackFaces { get; set; }
Property Value
HitFromInside
If true
, the query will detect a hit when starting inside shapes. In this case the collision normal will be Vector3(0, 0, 0)
. Does not affect concave polygon shapes or heightmap shapes.
public bool HitFromInside { get; set; }
Property Value
To
The ending point of the ray being queried for, in global coordinates.
public Vector3 To { get; set; }
Property Value
Methods
Create(Vector3, Vector3, uint, Array<Rid>)
Returns a new, pre-configured PhysicsRayQueryParameters3D object. Use it to quickly create query parameters using the most common options.
var query = PhysicsRayQueryParameters3D.create(position, position + Vector3(0, -10, 0))
var collision = get_world_3d().direct_space_state.intersect_ray(query)
public static PhysicsRayQueryParameters3D Create(Vector3 from, Vector3 to, uint collisionMask = 4294967295, Array<Rid> exclude = null)
Parameters
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.