-
-
Notifications
You must be signed in to change notification settings - Fork 21k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53280 from nekomatata/test-body-motion-parameters
- Loading branch information
Showing
28 changed files
with
679 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="PhysicsTestMotionParameters2D" inherits="RefCounted" version="4.0"> | ||
<brief_description> | ||
Parameters to be sent to a 2D body motion test. | ||
</brief_description> | ||
<description> | ||
This class contains parameters used in [method PhysicsServer2D.body_test_motion]. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<members> | ||
<member name="collide_separation_ray" type="bool" setter="set_collide_separation_ray_enabled" getter="is_collide_separation_ray_enabled" default="false"> | ||
If set to [code]true[/code], shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. | ||
If set to [code]false[/code], shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes. | ||
</member> | ||
<member name="exclude_bodies" type="Array" setter="set_exclude_bodies" getter="get_exclude_bodies" default="[]"> | ||
Optional array of body [RID] to exclude from collision. | ||
</member> | ||
<member name="from" type="Transform2D" setter="set_from" getter="get_from" default="Transform2D(1, 0, 0, 1, 0, 0)"> | ||
Transform in global space where the motion should start. Usually set to [member Node2D.global_transform] for the current body's transform. | ||
</member> | ||
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.08"> | ||
Increases the size of the shapes involved in the collision detection. | ||
</member> | ||
<member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2(0, 0)"> | ||
Motion vector to define the length and direction of the motion to test. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="PhysicsTestMotionParameters3D" inherits="RefCounted" version="4.0"> | ||
<brief_description> | ||
Parameters to be sent to a 3D body motion test. | ||
</brief_description> | ||
<description> | ||
This class contains parameters used in [method PhysicsServer3D.body_test_motion]. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<members> | ||
<member name="collide_separation_ray" type="bool" setter="set_collide_separation_ray_enabled" getter="is_collide_separation_ray_enabled" default="false"> | ||
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. | ||
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. | ||
</member> | ||
<member name="exclude_bodies" type="Array" setter="set_exclude_bodies" getter="get_exclude_bodies" default="[]"> | ||
Optional array of body [RID] to exclude from collision. | ||
</member> | ||
<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)"> | ||
Transform in global space where the motion should start. Usually set to [member Node3D.global_transform] for the current body's transform. | ||
</member> | ||
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.001"> | ||
Increases the size of the shapes involved in the collision detection. | ||
</member> | ||
<member name="max_collisions" type="int" setter="set_max_collisions" getter="get_max_collisions" default="1"> | ||
Maximum number of returned collisions, between [code]1[/code] and [code]32[/code]. Always returns the deepest detected collisions. | ||
</member> | ||
<member name="motion" type="Vector3" setter="set_motion" getter="get_motion" default="Vector3(0, 0, 0)"> | ||
Motion vector to define the length and direction of the motion to test. | ||
</member> | ||
</members> | ||
</class> |
Oops, something went wrong.