Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
PhysicsTestMotionResult3D¶
继承: RefCounted < Object
描述 PhysicsServer3D.body_test_motion 的运动和碰撞结果。
描述¶
描述 PhysicsServer3D.body_test_motion 的运动和碰撞结果。
方法¶
get_collider ( int collision_index=0 ) const |
|
get_collider_id ( int collision_index=0 ) const |
|
get_collider_rid ( int collision_index=0 ) const |
|
get_collider_shape ( int collision_index=0 ) const |
|
get_collider_velocity ( int collision_index=0 ) const |
|
get_collision_count ( ) const |
|
get_collision_depth ( int collision_index=0 ) const |
|
get_collision_local_shape ( int collision_index=0 ) const |
|
get_collision_normal ( int collision_index=0 ) const |
|
get_collision_point ( int collision_index=0 ) const |
|
get_collision_safe_fraction ( ) const |
|
get_collision_unsafe_fraction ( ) const |
|
get_remainder ( ) const |
|
get_travel ( ) const |
方法说明¶
Object get_collider ( int collision_index=0 ) const
如果发生了碰撞,则返回相撞物体所附加的 Object,碰撞物体由碰撞索引指定(默认为最深的碰撞)。见 Object.get_instance_id。
int get_collider_id ( int collision_index=0 ) const
如果发生了碰撞,则返回相撞物体所附加 Object 的唯一实例 ID,碰撞物体由碰撞索引指定(默认为最深的碰撞)。见 Object.get_instance_id。
RID get_collider_rid ( int collision_index=0 ) const
如果发生了碰撞,则返回相撞物体在 PhysicsServer3D 中使用的 RID,碰撞物体由碰撞索引指定(默认为最深的碰撞)。见 Object.get_instance_id。
int get_collider_shape ( int collision_index=0 ) const
如果发生了碰撞,则返回相撞物体形状的索引,碰撞物体由碰撞索引指定(默认为最深的碰撞)。见 Object.get_instance_id。
Vector3 get_collider_velocity ( int collision_index=0 ) const
如果发生了碰撞,则返回相撞物体的速度。见 Object.get_instance_id。
int get_collision_count ( ) const
返回检测到的碰撞次数。
float get_collision_depth ( int collision_index=0 ) const
如果发生了碰撞,则在给定碰撞索引(默认为最深碰撞)的情况下,返回沿碰撞法线的重叠长度。
int get_collision_local_shape ( int collision_index=0 ) const
如果发生了碰撞,则在给定碰撞索引(默认为最深碰撞)的情况下,返回移动对象的碰撞形状。
Vector3 get_collision_normal ( int collision_index=0 ) const
如果发生了碰撞,则在给定碰撞索引(默认为最深碰撞)的情况下,返回碰撞物体形状在碰撞点处的法线。
Vector3 get_collision_point ( int collision_index=0 ) const
如果发生了碰撞,则在给定碰撞索引(默认为最深碰撞)的情况下,返回使用全局坐标表示的碰撞点。
float get_collision_safe_fraction ( ) const
返回可以运动但不发生碰撞的最大比例,在 0
和 1
之间。
float get_collision_unsafe_fraction ( ) const
如果发生了碰撞,则返回碰撞运动所需的最小摩擦力,在 0
和 1
之间。
Vector3 get_remainder ( ) const
返回移动对象的剩余移动向量。
Vector3 get_travel ( ) const
返回移动对象的在碰撞前的运动。