Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

PhysicsTestMotionParameters3D

Inherits: RefCounted < Object

Provides parameters for PhysicsServer3D.body_test_motion.

Description

By changing various properties of this object, such as the motion, you can configure the parameters for PhysicsServer3D.body_test_motion.

Properties

bool

collide_separation_ray

false

RID[]

exclude_bodies

[]

int[]

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)

bool

recovery_as_collision

false


Property Descriptions

bool collide_separation_ray = false

  • void set_collide_separation_ray_enabled ( bool value )

  • bool 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.


RID[] exclude_bodies = []

  • void set_exclude_bodies ( RID[] value )

  • RID[] get_exclude_bodies ( )

Optional array of body RID to exclude from collision. Use CollisionObject3D.get_rid to get the RID associated with a CollisionObject3D-derived node.


int[] <