Use parameter classes instead of arguments for all physics queries
Same as what is already done for shape queries, applied to point and ray queries. Easier to document and more flexible to add more parameters. Also expose intersect_point method to script in 3D. Remove intersect_point_on_canvas in 2D, replaced with a parameter.
This commit is contained in:
parent
25bea73544
commit
acbd24ea84
27 changed files with 980 additions and 540 deletions
|
|
@ -4,7 +4,7 @@
|
|||
Parameters to be sent to a 3D shape physics query.
|
||||
</brief_description>
|
||||
<description>
|
||||
This class contains the shape and other parameters for 3D intersection/collision queries.
|
||||
This class contains the shape and other parameters for [PhysicsDirectSpaceState3D] intersection/collision queries.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
|
@ -24,6 +24,9 @@
|
|||
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
|
||||
The collision margin for the shape.
|
||||
</member>
|
||||
<member name="motion" type="Vector3" setter="set_motion" getter="get_motion" default="Vector3(0, 0, 0)">
|
||||
The motion of the shape being queried for.
|
||||
</member>
|
||||
<member name="shape" type="Resource" setter="set_shape" getter="get_shape">
|
||||
The [Shape3D] that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over [member shape_rid].
|
||||
</member>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue