From b31115cdc1c635e0e33f7a1e053dc2d944bcf521 Mon Sep 17 00:00:00 2001 From: Silc Renew Date: Thu, 11 Aug 2022 01:45:36 +0900 Subject: Add collision weight to PhysicsBody for penetrations must be avoided Co-authored-by: Juan Linietsky --- doc/classes/CollisionObject2D.xml | 3 +++ doc/classes/CollisionObject3D.xml | 3 +++ doc/classes/PhysicsServer2D.xml | 15 +++++++++++++++ doc/classes/PhysicsServer3D.xml | 15 +++++++++++++++ doc/classes/PhysicsServer3DExtension.xml | 13 +++++++++++++ 5 files changed, 49 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index 4353d97597..832f47e2bb 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -206,6 +206,9 @@ The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + + The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index f9e28824df..04ccf3fc62 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -177,6 +177,9 @@ The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + + The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index d7b5f24f4a..921c2ecf7e 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -358,6 +358,13 @@ Returns the physics layer or layers a body can collide with. + + + + + Returns the body's collision priority. + + @@ -509,6 +516,14 @@ Sets the physics layer or layers a body can collide with. + + + + + + Sets the body's collision priority. + + diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index c5456f7536..ac9dfbf3f8 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -338,6 +338,13 @@ Returns the physics layer or layers a body can collide with. + + + + + Returns the body's collision priority. + + @@ -505,6 +512,14 @@ Sets the physics layer or layers a body can collide with. + + + + + + Sets the body's collision priority. + + diff --git a/doc/classes/PhysicsServer3DExtension.xml b/doc/classes/PhysicsServer3DExtension.xml index 4188b04e4a..200065de54 100644 --- a/doc/classes/PhysicsServer3DExtension.xml +++ b/doc/classes/PhysicsServer3DExtension.xml @@ -286,6 +286,12 @@ + + + + + + @@ -430,6 +436,13 @@ + + + + + + + -- cgit v1.2.3