PhysicsTestMotionParameters3D

Inherits: RefCounted < Object

Parameters to be sent to a 3D body motion test.

Description

This class contains parameters used in PhysicsServer3D.body_test_motion.

Properties

bool

collide_separation_ray

false

Array

exclude_bodies

[]

Array

exclude_objects

[]

Transform3D

from

Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

float

margin

0.001

int

max_collisions

1

Vector3

motion

Vector3(0, 0, 0)

Property Descriptions

  • bool collide_separation_ray

Default

false

Setter

set_collide_separation_ray_enabled(value)

Getter

is_collide_separation_ray_enabled()

If set to true, shapes of type PhysicsServer3D.SHAPE_SEPARATION_RAY are used to detect collisions and can stop the motion. Can be useful when snapping to the ground.

If set to false, shapes of type PhysicsServer3D.SHAPE_SEPARATION_RAY are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes.


Default

[]

Setter

set_exclude_bodies(value)

Getter

get_exclude_bodies()

Optional array of body RID to exclude from collision.


Default

[]

Setter

set_exclude_objects(value)

Getter

get_exclude_objects()

Optional array of object unique instance ID to exclude from collision. See Object.get_instance_id.


Default

Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)

Setter

set_from(value)

Getter

get_from()

Transform in global space where the motion should start. Usually set to Node3D.global_transform for the current body's transform.


Default

0.001

Setter

set_margin(value)

Getter

get_margin()

Increases the size of the shapes involved in the collision detection.


  • int max_collisions

Default

1

Setter

set_max_collisions(value)

Getter

get_max_collisions()

Maximum number of returned collisions, between 1 and 32. Always returns the deepest detected collisions.


Default

Vector3(0, 0, 0)

Setter

set_motion(value)

Getter

get_motion()

Motion vector to define the length and direction of the motion to test.