Up to date
This page is up to date for Redot 4.3
.
If you still find outdated information, please create 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ΒΆ
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Property DescriptionsΒΆ
bool collide_separation_ray = false
π
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.
Array[RID] 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.
Array[int] exclude_objects = []
π
Optional array of object unique instance ID to exclude from collision. See Object.get_instance_id.
Transform3D from = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
π
void set_from(value: Transform3D)
Transform3D get_from()
Transform in global space where the motion should start. Usually set to Node3D.global_transform for the current body's transform.
Increases the size of the shapes involved in the collision detection.
Maximum number of returned collisions, between 1
and 32
. Always returns the deepest detected collisions.
Vector3 motion = Vector3(0, 0, 0)
π
Motion vector to define the length and direction of the motion to test.
bool recovery_as_collision = false
π
If set to true
, any depenetration from the recovery phase is reported as a collision; this is used e.g. by CharacterBody3D for improving floor detection during floor snapping.
If set to false
, only collisions resulting from the motion are reported, which is generally the desired behavior.