PhysicsTestMotionResult3D

继承: RefCounted < Object

描述PhysicsServer3D.body_test_motion()的运动和碰撞结果。

描述

描述PhysicsServer3D.body_test_motion()的运动和碰撞结果。

方法

Object

get_collider(collision_index: int = 0) const

int

get_collider_id(collision_index: int = 0) const

RID

get_collider_rid(collision_index: int = 0) const

int

get_collider_shape(collision_index: int = 0) const

Vector3

get_collider_velocity(collision_index: int = 0) const

int

get_collision_count() const

float

get_collision_depth(collision_index: int = 0) const

int

get_collision_local_shape(collision_index: int = 0) const

Vector3

get_collision_normal(collision_index: int = 0) const

Vector3

get_collision_point(collision_index: int = 0) const

float

get_collision_safe_fraction() const

float

get_collision_unsafe_fraction() const

Vector3

get_remainder() const

Vector3

get_travel() const


方法说明

Object get_collider(collision_index: int = 0) const 🔗

如果发生碰撞,则返回给定碰撞索引(默认为最深碰撞)的碰撞主体的附加Object


int get_collider_id(collision_index: int = 0) const 🔗

如果发生冲突,则返回冲突主体的附加Object的唯一实例ID,给定冲突索引(默认为最深的冲突)。请参阅Object.get_instance_id()


RID get_collider_rid(collision_index: int = 0) const 🔗

如果发生碰撞,则返回给定碰撞索引(默认为最深碰撞)的PhysicsServer3D使用的碰撞主体的RID


int get_collider_shape(collision_index: int = 0) const 🔗

如果发生碰撞,则返回给定碰撞索引(默认为最深的碰撞)的碰撞体的形状索引。请参阅ColliderObjectBase


Vector3 get_collider_velocity(collision_index: int = 0) const 🔗

如果发生碰撞,则返回给定碰撞指数(默认为最深碰撞)的碰撞体速度。


int get_collision_count() const 🔗

返回检测到的冲突数。


float get_collision_depth(collision_index: int = 0) const 🔗

如果发生碰撞,则返回给定碰撞索引(默认为最深碰撞)的沿碰撞法线的重叠长度。


int get_collision_local_shape(collision_index: int = 0) const 🔗

如果发生碰撞,则返回给定碰撞索引(默认为最深碰撞)的移动对象的碰撞形状。


Vector3 get_collision_normal(collision_index: int = 0) const 🔗

如果发生碰撞,则在给定碰撞索引(默认为最深碰撞)的碰撞点返回碰撞体的形状法线。


Vector3 get_collision_point(collision_index: int = 0) const 🔗

如果发生碰撞,则返回给定碰撞索引(默认为最深碰撞)的全局坐标中的碰撞点。


float get_collision_safe_fraction() const 🔗

返回01之间在不发生冲突的情况下可以发生的运动的最大分数。


float get_collision_unsafe_fraction() const 🔗

如果发生碰撞,则返回01之间碰撞所需的最小运动分数。


Vector3 get_remainder() const 🔗

返回移动对象的剩余移动向量。


Vector3 get_travel() const 🔗

返回移动物体碰撞前的行程。