0.2.0-dev Download ZIP
40 lines ·3.2 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="PhysicsTestMotionParameters3D" inherits="RefCounted" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Provides parameters for [method PhysicsServer3D.body_test_motion]. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | By changing various properties of this object, such as the motion, you can configure the parameters for [method PhysicsServer3D.body_test_motion]. |
| 8 | [b]Note:[/b] For optimal performance results, it is recommended to create this object in advance, store it, and reuse it for every subsequent query. |
| 9 | </description> |
| 10 | <tutorials> |
| 11 | </tutorials> |
| 12 | <members> |
| 13 | <member name="collide_separation_ray" type="bool" setter="set_collide_separation_ray_enabled" getter="is_collide_separation_ray_enabled" default="false"> |
| 14 | If set to [code]true[/code], shapes of type [constant PhysicsServer3D.SHAPE_SEPARATION_RAY] are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. |
| 15 | If set to [code]false[/code], shapes of type [constant PhysicsServer3D.SHAPE_SEPARATION_RAY] are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes. |
| 16 | </member> |
| 17 | <member name="exclude_bodies" type="RID[]" setter="set_exclude_bodies" getter="get_exclude_bodies" default="[]"> |
| 18 | Optional array of body [RID] to exclude from collision. Use [method CollisionObject3D.get_rid] to get the [RID] associated with a [CollisionObject3D]-derived node. |
| 19 | </member> |
| 20 | <member name="exclude_objects" type="int[]" setter="set_exclude_objects" getter="get_exclude_objects" default="[]"> |
| 21 | Optional array of object unique instance ID to exclude from collision. See [method Object.get_instance_id]. |
| 22 | </member> |
| 23 | <member name="from" type="Transform3D" setter="set_from" getter="get_from" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> |
| 24 | Transform in global space where the motion should start. Usually set to [member Node3D.global_transform] for the current body's transform. |
| 25 | </member> |
| 26 | <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.001"> |
| 27 | Increases the size of the shapes involved in the collision detection. |
| 28 | </member> |
| 29 | <member name="max_collisions" type="int" setter="set_max_collisions" getter="get_max_collisions" default="1"> |
| 30 | Maximum number of returned collisions, between [code]1[/code] and [code]32[/code]. Always returns the deepest detected collisions. |
| 31 | </member> |
| 32 | <member name="motion" type="Vector3" setter="set_motion" getter="get_motion" default="Vector3(0, 0, 0)"> |
| 33 | Motion vector to define the length and direction of the motion to test. |
| 34 | </member> |
| 35 | <member name="recovery_as_collision" type="bool" setter="set_recovery_as_collision_enabled" getter="is_recovery_as_collision_enabled" default="false"> |
| 36 | If set to [code]true[/code], 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. |
| 37 | If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behavior. |
| 38 | </member> |
| 39 | </members> |
| 40 | </class> |