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.

PhysicsServer3DExtension

继承: PhysicsServer3D < Object

提供覆盖后可以用来创建自定义 PhysicsServer3D 实现的虚方法。

描述

这个类扩展自 PhysicsServer3D,提供可额外的可覆盖虚方法。覆盖这些方法后,就不会调用物理服务器内部方法,而是调用这些覆盖后的方法。

旨在用于 GDExtension,用于创建自定义 PhysicsServer3D 实现。

方法

void

_area_add_shape(area: RID, shape: RID, transform: Transform3D, disabled: bool) virtual

void

_area_attach_object_instance_id(area: RID, id: int) virtual

void

_area_clear_shapes(area: RID) virtual

RID

_area_create() virtual

int

_area_get_collision_layer(area: RID) virtual const

int

_area_get_collision_mask(area: RID) virtual const

int

_area_get_object_instance_id(area: RID) virtual const

Variant

_area_get_param(area: RID, param: AreaParameter) virtual const

RID

_area_get_shape(area: RID, shape_idx: int) virtual const

int

_area_get_shape_count(area: RID) virtual const

Transform3D

_area_get_shape_transform(area: RID, shape_idx: int) virtual const

RID

_area_get_space(area: RID) virtual const

Transform3D

_area_get_transform(area: RID) virtual const

void

_area_remove_shape(area: RID, shape_idx: int) virtual

void

_area_set_area_monitor_callback(area: RID, callback: Callable) virtual

void

_area_set_collision_layer(area: RID, layer: int) virtual

void

_area_set_collision_mask(area: RID, mask: int) virtual

void

_area_set_monitor_callback(area: RID, callback: Callable) virtual

void

_area_set_monitorable(area: RID, monitorable: bool) virtual

void

_area_set_param(area: RID, param: AreaParameter, value: Variant) virtual

void

_area_set_ray_pickable(area: RID, enable: bool) virtual

void

_area_set_shape(area: RID, shape_idx: int, shape: RID) virtual

void

_area_set_shape_disabled(area: RID, shape_idx: int, disabled: bool) virtual

void

_area_set_shape_transform(area: RID, shape_idx: int, transform: Transform3D) virtual

void

_area_set_space(area: RID, space: RID) virtual

void

_area_set_transform(area: RID, transform: Transform3D) virtual

void

_body_add_collision_exception(body: RID, excepted_body: RID) virtual

void

_body_add_constant_central_force(body: RID, force: Vector3) virtual

void

_body_add_constant_force(body: RID, force: Vector3, position: Vector3) virtual

void

_body_add_constant_torque(body: RID, torque: Vector3) virtual

void

_body_add_shape(body: RID, shape: RID, transform: Transform3D, disabled: bool) virtual

void

_body_apply_central_force(body: RID, force: Vector3) virtual

void

_body_apply_central_impulse(body: RID, impulse: Vector3) virtual

void

_body_apply_force(body: RID, force: Vector3, position: Vector3) virtual

void

_body_apply_impulse(body: RID, impulse: Vector3, position: Vector3) virtual

void

_body_apply_torque(body: RID, torque: Vector3) virtual

void

_body_apply_torque_impulse(body: RID, impulse: Vector3) virtual

void

_body_attach_object_instance_id(body: RID, id: int) virtual

void

_body_clear_shapes(body: RID) virtual

RID

_body_create() virtual

Array[RID]

_body_get_collision_exceptions(body: RID) virtual const

int

_body_get_collision_layer(body: RID) virtual const

int

_body_get_collision_mask(body: RID) virtual const

float

_body_get_collision_priority(body: RID) virtual const

Vector3

_body_get_constant_force(body: RID) virtual const

Vector3

_body_get_constant_torque(body: RID) virtual const

float

_body_get_contacts_reported_depth_threshold(body: RID) virtual const

PhysicsDirectBodyState3D

_body_get_direct_state(body: RID) virtual

int

_body_get_max_contacts_reported(body: RID) virtual const

BodyMode

_body_get_mode(body: RID) virtual const

int

_body_get_object_instance_id(body: RID) virtual const

Variant

_body_get_param(body: RID, param: BodyParameter) virtual const

RID

_body_get_shape(body: RID, shape_idx: int) virtual const

int

_body_get_shape_count(body: RID) virtual const

Transform3D

_body_get_shape_transform(body: RID, shape_idx: int) virtual const

RID

_body_get_space(body: RID) virtual const

Variant

_body_get_state(body: RID, state: BodyState) virtual const

int

_body_get_user_flags(body: RID) virtual const

bool

_body_is_axis_locked(body: RID, axis: BodyAxis) virtual const

bool

_body_is_continuous_collision_detection_enabled(body: RID) virtual const

bool

_body_is_omitting_force_integration(body: RID) virtual const

void

_body_remove_collision_exception(body: RID, excepted_body: RID) virtual

void

_body_remove_shape(body: RID, shape_idx: int) virtual

void

_body_reset_mass_properties(body: RID) virtual

void

_body_set_axis_lock(body: RID, axis: BodyAxis, lock: bool) virtual

void

_body_set_axis_velocity(body: RID, axis_velocity: Vector3) virtual

void

_body_set_collision_layer(body: RID, layer: int) virtual

void

_body_set_collision_mask(body: RID, mask: int) virtual

void

_body_set_collision_priority(body: RID, priority: float) virtual

void

_body_set_constant_force(body: RID, force: Vector3) virtual

void

_body_set_constant_torque(body: RID, torque: Vector3) virtual

void

_body_set_contacts_reported_depth_threshold(body: RID, threshold: float) virtual

void

_body_set_enable_continuous_collision_detection(body: RID, enable: bool) virtual

void

_body_set_force_integration_callback(body: RID, callable: Callable, userdata: Variant) virtual

void

_body_set_max_contacts_reported(body: RID, amount: int) virtual

void

_body_set_mode(body: RID, mode: BodyMode) virtual

void

_body_set_omit_force_integration(body: RID, enable: bool) virtual

void

_body_set_param(body: RID, param: BodyParameter, value: Variant) virtual

void

_body_set_ray_pickable(body: RID, enable: bool) virtual

void

_body_set_shape(body: RID, shape_idx: int, shape: RID) virtual

void

_body_set_shape_disabled(body: RID, shape_idx: int, disabled: bool) virtual

void

_body_set_shape_transform(body: RID, shape_idx: int, transform: Transform3D) virtual

void

_body_set_space(body: RID, space: RID) virtual

void

_body_set_state(body: RID, state: BodyState, value: Variant) virtual

void

_body_set_state_sync_callback(body: RID, callable: Callable) virtual

void

_body_set_user_flags(body: RID, flags: int) virtual

bool

_body_test_motion(body: RID, from: Transform3D, motion: Vector3, margin: float, max_collisions: int, collide_separation_ray: bool, recovery_as_collision: bool, result: PhysicsServer3DExtensionMotionResult*) virtual const

RID

_box_shape_create() virtual

RID

_capsule_shape_create() virtual

RID

_concave_polygon_shape_create() virtual

float

_cone_twist_joint_get_param(joint: RID, param: ConeTwistJointParam) virtual const

void

_cone_twist_joint_set_param(joint: RID, param: ConeTwistJointParam, value: float) virtual

RID

_convex_polygon_shape_create() virtual

RID

_custom_shape_create() virtual

RID

_cylinder_shape_create() virtual

void

_end_sync() virtual

void

_finish() virtual

void

_flush_queries() virtual

void

_free_rid(rid: RID) virtual

bool

_generic_6dof_joint_get_flag(joint: RID, axis: Vector3.Axis, flag: G6DOFJointAxisFlag) virtual const

float

_generic_6dof_joint_get_param(joint: RID, axis: Vector3.Axis, param: G6DOFJointAxisParam) virtual