Up to date

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

PhysicsTestMotionResult2D

Inherits: RefCounted < Object

Describes the motion and collision result from PhysicsServer2D.body_test_motion.

Description

Describes the motion and collision result from PhysicsServer2D.body_test_motion.

Methods

Object

get_collider ( ) const

int

get_collider_id ( ) const

RID

get_collider_rid ( ) const

int

get_collider_shape ( ) const

Vector2

get_collider_velocity ( ) const

float

get_collision_depth ( ) const

int

get_collision_local_shape ( ) const

Vector2

get_collision_normal ( ) const

Vector2

get_collision_point ( ) const

float

get_collision_safe_fraction ( ) const

float

get_collision_unsafe_fraction ( ) const

Vector2

get_remainder ( ) const

Vector2

get_travel ( ) const


Method Descriptions

Object get_collider ( ) const

Returns the colliding body's attached Object, if a collision occurred.


int get_collider_id ( )