Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions doc/classes/CollisionObject2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@
Returns the parent object of the given shape owner.
</description>
</method>
<method name="shape_owner_get_physics_material" qualifiers="const">
<return type="PhysicsMaterial" />
<param index="0" name="owner_id" type="int" />
<description>
Returns the [PhysicsMaterial] (if any) set on the shape owner.
</description>
</method>
<method name="shape_owner_get_shape" qualifiers="const">
<return type="Shape2D" />
<param index="0" name="owner_id" type="int" />
Expand Down Expand Up @@ -214,6 +221,14 @@
Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [param owner_id] to [param margin] pixels.
</description>
</method>
<method name="shape_owner_set_physics_material">
<return type="void" />
<param index="0" name="owner_id" type="int" />
<param index="1" name="material" type="PhysicsMaterial" />
<description>
Sets the [PhysicsMaterial] for the shape owner.
</description>
</method>
<method name="shape_owner_set_transform">
<return type="void" />
<param index="0" name="owner_id" type="int" />
Expand Down
15 changes: 15 additions & 0 deletions doc/classes/CollisionObject3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@
Returns the parent object of the given shape owner.
</description>
</method>
<method name="shape_owner_get_physics_material" qualifiers="const">
<return type="PhysicsMaterial" />
<param index="0" name="owner_id" type="int" />
<description>
Returns the [PhysicsMaterial] (if any) set on the shape owner.
</description>
</method>
<method name="shape_owner_get_shape" qualifiers="const">
<return type="Shape3D" />
<param index="0" name="owner_id" type="int" />
Expand Down Expand Up @@ -172,6 +179,14 @@
If [code]true[/code], disables the given shape owner.
</description>
</method>
<method name="shape_owner_set_physics_material">
<return type="void" />
<param index="0" name="owner_id" type="int" />
<param index="1" name="material" type="PhysicsMaterial" />
<description>
Sets the [PhysicsMaterial] for the shape owner.
</description>
</method>
<method name="shape_owner_set_transform">
<return type="void" />
<param index="0" name="owner_id" type="int" />
Expand Down
3 changes: 3 additions & 0 deletions doc/classes/CollisionShape2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0">
The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity.
</member>
<member name="physics_material" type="PhysicsMaterial" setter="set_physics_material" getter="get_physics_material">
The shape's physics material. Setting a physics material lets the body have different parts with different properties, such as the head and handle of a hammer. Physics materials set on a shape take priority over those set on its body.
</member>
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
The actual shape owned by this collision shape.
</member>
Expand Down
3 changes: 3 additions & 0 deletions doc/classes/CollisionShape3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false" keywords="enabled">
A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred].
</member>
<member name="physics_material" type="PhysicsMaterial" setter="set_physics_material" getter="get_physics_material">
The shape's physics material. Setting a physics material lets the body have different parts with different properties, such as the head and handle of a hammer. Physics materials set on a shape take priority over those set on its body.
</member>
<member name="shape" type="Shape3D" setter="set_shape" getter="get_shape">
The actual shape owned by this collision shape.
</member>
Expand Down
36 changes: 36 additions & 0 deletions doc/classes/PhysicsServer2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,29 @@
Returns the [RID] of the shape with the given index in the body's array of shapes.
</description>
</method>
<method name="body_get_shape_bounce_override" qualifiers="const">
<return type="float" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<description>
Returns the bounciness override for the shape or [constant @GDScript.NAN] if no override is set.
</description>
</method>
<method name="body_get_shape_count" qualifiers="const">
<return type="int" />
<param index="0" name="body" type="RID" />
<description>
Returns the number of shapes added to the body.
</description>
</method>
<method name="body_get_shape_friction_override" qualifiers="const">
<return type="float" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<description>
Returns the friction override for the shape or [constant @GDScript.NAN] if no override is set.
</description>
</method>
<method name="body_get_shape_transform" qualifiers="const">
<return type="Transform2D" />
<param index="0" name="body" type="RID" />
Expand Down Expand Up @@ -655,6 +671,16 @@
Sets the one-way collision properties of the body's shape with the given index. If [param enable] is [code]true[/code], the one-way collision direction given by the shape's local upward axis [code]body_get_shape_transform(body, shape_idx).y[/code] will be used to ignore collisions with the shape in the opposite direction, and to ensure depenetration of kinematic bodies happens in this direction.
</description>
</method>
<method name="body_set_shape_bounce_override">
<return type="void" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<param index="2" name="enable" type="bool" />
<param index="3" name="bounce" type="float" default="0.0" />
<description>
Sets the bounce for the shape if [param enable] is [code]true[/code], resets to the body's value if [code]false[/code]. A negative value of [param bounce] is equivalent to enabling [member PhysicsMaterial.absorbent].
</description>
</method>
<method name="body_set_shape_disabled">
<return type="void" />
<param index="0" name="body" type="RID" />
Expand All @@ -664,6 +690,16 @@
Sets the disabled property of the body's shape with the given index. If [param disabled] is [code]true[/code], then the shape will be ignored in all collision detection.
</description>
</method>
<method name="body_set_shape_friction_override">
<return type="void" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<param index="2" name="enable" type="bool" />
<param index="3" name="friction" type="float" default="0.0" />
<description>
Sets the friction for the shape if [param enable] is [code]true[/code], resets to the body's value if [code]false[/code]. A negative value of [param friction] is equivalent to enabling [member PhysicsMaterial.rough].
</description>
</method>
<method name="body_set_shape_transform">
<return type="void" />
<param index="0" name="body" type="RID" />
Expand Down
36 changes: 36 additions & 0 deletions doc/classes/PhysicsServer2DExtension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,29 @@
Overridable version of [method PhysicsServer2D.body_get_shape].
</description>
</method>
<method name="_body_get_shape_bounce_override" qualifiers="virtual required const">
<return type="float" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<description>
Overridable version of [method PhysicsServer2D.body_get_shape_bounce_override].
</description>
</method>
<method name="_body_get_shape_count" qualifiers="virtual required const">
<return type="int" />
<param index="0" name="body" type="RID" />
<description>
Overridable version of [method PhysicsServer2D.body_get_shape_count].
</description>
</method>
<method name="_body_get_shape_friction_override" qualifiers="virtual required const">
<return type="float" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<description>
Overridable version of [method PhysicsServer2D.body_get_shape_friction_override].
</description>
</method>
<method name="_body_get_shape_transform" qualifiers="virtual required const">
<return type="Transform2D" />
<param index="0" name="body" type="RID" />
Expand Down Expand Up @@ -672,6 +688,16 @@
Overridable version of [method PhysicsServer2D.body_set_shape_as_one_way_collision].
</description>
</method>
<method name="_body_set_shape_bounce_override" qualifiers="virtual required">
<return type="void" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<param index="2" name="enable" type="bool" />
<param index="3" name="bounce" type="float" />
<description>
Overridable version of [method PhysicsServer2D.body_set_shape_bounce_override].
</description>
</method>
<method name="_body_set_shape_disabled" qualifiers="virtual required">
<return type="void" />
<param index="0" name="body" type="RID" />
Expand All @@ -681,6 +707,16 @@
Overridable version of [method PhysicsServer2D.body_set_shape_disabled].
</description>
</method>
<method name="_body_set_shape_friction_override" qualifiers="virtual required">
<return type="void" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<param index="2" name="enable" type="bool" />
<param index="3" name="friction" type="float" />
<description>
Overridable version of [method PhysicsServer2D.body_set_shape_friction_override].
</description>
</method>
<method name="_body_set_shape_transform" qualifiers="virtual required">
<return type="void" />
<param index="0" name="body" type="RID" />
Expand Down
36 changes: 36 additions & 0 deletions doc/classes/PhysicsServer3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,29 @@
Returns the [RID] of the nth shape of a body.
</description>
</method>
<method name="body_get_shape_bounce_override" qualifiers="const">
<return type="float" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<description>
Returns the bounciness override for the shape or [constant @GDScript.NAN] if no override is set.
</description>
</method>
<method name="body_get_shape_count" qualifiers="const">
<return type="int" />
<param index="0" name="body" type="RID" />
<description>
Returns the number of shapes assigned to a body.
</description>
</method>
<method name="body_get_shape_friction_override" qualifiers="const">
<return type="float" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<description>
Returns the friction override for the shape or [constant @GDScript.NAN] if no override is set.
</description>
</method>
<method name="body_get_shape_transform" qualifiers="const">
<return type="Transform3D" />
<param index="0" name="body" type="RID" />
Expand Down Expand Up @@ -644,6 +660,16 @@
Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID].
</description>
</method>
<method name="body_set_shape_bounce_override">
<return type="void" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<param index="2" name="enable" type="bool" />
<param index="3" name="bounce" type="float" default="0.0" />
<description>
Sets the bounciness for the shape if [param enable] is [code]true[/code], resets to the body's value if [code]false[/code]. A negative value of [param bounce] is equivalent to enabling [member PhysicsMaterial.absorbent].
</description>
</method>
<method name="body_set_shape_disabled">
<return type="void" />
<param index="0" name="body" type="RID" />
Expand All @@ -652,6 +678,16 @@
<description>
</description>
</method>
<method name="body_set_shape_friction_override">
<return type="void" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<param index="2" name="enable" type="bool" />
<param index="3" name="friction" type="float" default="0.0" />
<description>
Sets the friction for the shape if [param enable] is [code]true[/code], resets to the body's value if [code]false[/code]. A negative value of [param friction] is equivalent to enabling [member PhysicsMaterial.rough].
</description>
</method>
<method name="body_set_shape_transform">
<return type="void" />
<param index="0" name="body" type="RID" />
Expand Down
36 changes: 36 additions & 0 deletions doc/classes/PhysicsServer3DExtension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,28 @@
<description>
</description>
</method>
<method name="_body_get_shape_bounce_override" qualifiers="virtual required const">
<return type="float" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<description>
Overridable version of [method PhysicsServer3D.body_get_shape_bounce_override].
</description>
</method>
<method name="_body_get_shape_count" qualifiers="virtual required const">
<return type="int" />
<param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_shape_friction_override" qualifiers="virtual required const">
<return type="float" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<description>
Overridable version of [method PhysicsServer3D.body_get_shape_friction_override].
</description>
</method>
<method name="_body_get_shape_transform" qualifiers="virtual required const">
<return type="Transform3D" />
<param index="0" name="body" type="RID" />
Expand Down Expand Up @@ -556,6 +572,16 @@
<description>
</description>
</method>
<method name="_body_set_shape_bounce_override" qualifiers="virtual required">
<return type="void" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<param index="2" name="enable" type="bool" />
<param index="3" name="bounce" type="float" />
<description>
Overridable version of [method PhysicsServer3D.body_set_shape_bounce_override].
</description>
</method>
<method name="_body_set_shape_disabled" qualifiers="virtual required">
<return type="void" />
<param index="0" name="body" type="RID" />
Expand All @@ -564,6 +590,16 @@
<description>
</description>
</method>
<method name="_body_set_shape_friction_override" qualifiers="virtual required">
<return type="void" />
<param index="0" name="body" type="RID" />
<param index="1" name="shape_idx" type="int" />
<param index="2" name="enable" type="bool" />
<param index="3" name="friction" type="float" />
<description>
Overridable version of [method PhysicsServer3D.body_set_shape_friction_override].
</description>
</method>
<method name="_body_set_shape_transform" qualifiers="virtual required">
<return type="void" />
<param index="0" name="body" type="RID" />
Expand Down
Loading
Loading