TestRaycastTo3D

Inherits: QueryTest3D < Node3D

A query test that casts a ray or shape from the QueryItem3D to a QueryContext3D, to check if it hits.

Description

A query test that casts a ray or shape from the QueryItem3D to a QueryContext3D, to check if it hits.

Properties

bool

cast_from_context

false

int

collision_mask

1

QueryContext3D

context

float

cost

1.42 (overrides QueryTest3D)

Array[NodePath]

exclusions

[]

TestRaycastTo3D.RaycastMode

raycast_mode

0

Shape3D

shape

TestType

test_type

1 (overrides QueryTest3D)

bool

use_shape_cast

false


Property Descriptions

bool cast_from_context = false 🔗

  • void set_cast_from_context(value: bool)

  • bool get_cast_from_context()

On true, invert the casting and start from context into QueryItem3D.


int collision_mask = 1 🔗

  • void set_collision_mask(value: int)

  • int get_collision_mask()

The physics layers this test will detect.


QueryContext3D context 🔗

The target QueryContext3D that will be detected.


Array[NodePath] exclusions = [] 🔗

  • void set_exclusions(value: Array[NodePath])

  • Array[NodePath] get_exclusions()

What collision objects will be excluded from the test. Usually the querier should be excluded.


TestRaycastTo3D.RaycastMode raycast_mode = 0 🔗

  • void set_raycast_mode(value: TestRaycastTo3D.RaycastMode)

  • TestRaycastTo3D.RaycastMode get_raycast_mode()

What type of collision object this test will detect.


Shape3D shape 🔗

  • void set_shape(value: Shape3D)

  • Shape3D get_shape()

The actual shape used by this test.


bool use_shape_cast = false 🔗

  • void set_use_shape_cast(value: bool)

  • bool get_use_shape_cast()

Use a Shape3D instead of a raycast.