From 4da3a87f7d31dda644f6bd6dc300bd6e4f7eef79 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Tue, 10 Aug 2021 11:48:19 -0700 Subject: Remove infinite inertia and ray shapes from CharacterBody Infinite inertia: Not needed anymore, since it's now possible to set one-directional collision layers in order for characters to ignore rigid bodies, while rigid bodies still collide with characters. Ray shapes: They were introduced as a work around to allow constant speed on slopes, which is now possible with the new property in CharacterBody instead. --- doc/classes/CharacterBody2D.xml | 3 --- doc/classes/CharacterBody3D.xml | 3 --- doc/classes/PhysicsBody2D.xml | 12 ++++-------- doc/classes/PhysicsBody3D.xml | 12 ++++-------- doc/classes/PhysicsServer2D.xml | 29 ++++++++++------------------- doc/classes/PhysicsServer3D.xml | 34 ++++++++++++---------------------- doc/classes/RayShape2D.xml | 23 ----------------------- doc/classes/RayShape3D.xml | 23 ----------------------- 8 files changed, 30 insertions(+), 109 deletions(-) delete mode 100644 doc/classes/RayShape2D.xml delete mode 100644 doc/classes/RayShape3D.xml (limited to 'doc/classes') diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index a6138ee7df..a20b0aeea6 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -122,9 +122,6 @@ Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping. - - If [code]true[/code], the body will be able to push [RigidBody2D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D]. - Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]. diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index 4cb4f9a850..7dc4ae9be3 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -79,9 +79,6 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. - - If [code]true[/code], the body will be able to push [RigidBody3D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D]. - Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide]. diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 4d1cd072d0..e00c473bcd 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -26,10 +26,8 @@ - - - - + + Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision. If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. @@ -47,10 +45,8 @@ - - - - + + Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision (should there be one). diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index a2a68115d0..ea2553e28a 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -33,10 +33,8 @@ - - - - + + Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision. If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. @@ -62,10 +60,8 @@ - - - - + + Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one). diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index cf23fecd08..387d79d210 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -593,11 +593,9 @@ - - - - - + + + Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in. @@ -723,11 +721,6 @@ - - - - - @@ -847,27 +840,25 @@ This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks. - - - + This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections. - + This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. - + This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. - + This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. - + This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the [member CollisionPolygon2D.polygon] property, polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon. - + This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. - + This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index d6b7318a06..d46e38ac5f 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -569,11 +569,9 @@ - - - - - + + + Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult3D] can be passed to return additional information in. @@ -851,11 +849,6 @@ - - - - - @@ -1178,34 +1171,31 @@ The [Shape3D] is a [WorldMarginShape3D]. - - The [Shape3D] is a [RayShape3D]. - - + The [Shape3D] is a [SphereShape3D]. - + The [Shape3D] is a [BoxShape3D]. - + The [Shape3D] is a [CapsuleShape3D]. - + The [Shape3D] is a [CylinderShape3D]. - + The [Shape3D] is a [ConvexPolygonShape3D]. - + The [Shape3D] is a [ConcavePolygonShape3D]. - + The [Shape3D] is a [HeightMapShape3D]. - + The [Shape3D] is a [SoftBody3D]. - + This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml deleted file mode 100644 index 432c650074..0000000000 --- a/doc/classes/RayShape2D.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - Ray shape for 2D collisions. - - - Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - - - - - - - - The ray's length. - - - If [code]true[/code], allow the shape to return the correct normal. - - - - - diff --git a/doc/classes/RayShape3D.xml b/doc/classes/RayShape3D.xml deleted file mode 100644 index 9839044c30..0000000000 --- a/doc/classes/RayShape3D.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - Ray shape for 3D collisions. - - - Ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - - - - - - - - The ray's length. - - - If [code]true[/code], allow the shape to return the correct normal. - - - - - -- cgit v1.2.3