Table of Contents

Class PhysicsShapeQueryParameters3D

Namespace
Godot
Assembly
GodotSharp.dll

By changing various properties of this object, such as the shape, you can configure the parameters for IntersectShape(PhysicsShapeQueryParameters3D, int).

public class PhysicsShapeQueryParameters3D : RefCounted, IDisposable
Inheritance
PhysicsShapeQueryParameters3D
Implements
Inherited Members

Constructors

PhysicsShapeQueryParameters3D()

public PhysicsShapeQueryParameters3D()

Properties

CollideWithAreas

If true, the query will take Area3Ds into account.

public bool CollideWithAreas { get; set; }

Property Value

bool

CollideWithBodies

If true, the query will take PhysicsBody3Ds into account.

public bool CollideWithBodies { get; set; }

Property Value

bool

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

uint

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

Array<Rid>

Margin

The collision margin for the shape.

public float Margin { get; set; }

Property Value

float

Motion

The motion of the shape being queried for.

public Vector3 Motion { get; set; }

Property Value

Vector3

Shape

The Shape3D that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over ShapeRid.

public Resource Shape { get; set; }

Property Value

Resource

ShapeRid

The queried shape's Rid that will be used for collision/intersection queries. Use this over Shape if you want to optimize for performance using the Servers API:

RID shapeRid = PhysicsServer3D.ShapeCreate(PhysicsServer3D.ShapeType.Sphere);
  float radius = 2.0f;
  PhysicsServer3D.ShapeSetData(shapeRid, radius);

var params = new PhysicsShapeQueryParameters3D(); params.ShapeRid = shapeRid;

// Execute physics queries here...

// Release the shape when done with physics queries. PhysicsServer3D.FreeRid(shapeRid);

public Rid ShapeRid { get; set; }

Property Value

Rid

Transform

The queried shape's transform matrix.

public Transform3D Transform { get; set; }

Property Value

Transform3D

Methods

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_name

Name of the method to check for.

Returns

bool

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_name

Name of the signal to check for.

Returns

bool

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_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool