From 50de99f0503c220aea71e882a16e0fb64d7eb680 Mon Sep 17 00:00:00 2001 From: CowThing Date: Wed, 8 Jun 2016 15:18:45 -0400 Subject: [PATCH] Filling in documentation Documentation for BoneAttachment, KinematicBody, ParallaxBackground, ParallaxLayer, and TestCube --- doc/base/classes.xml | 48 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 9b8940bc50c..b74ac1c1442 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -6025,8 +6025,10 @@ + A node that will attach to a bone. + This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone. @@ -17560,8 +17562,12 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Kinematic body 3D node. + Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: + Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + Kinematic Characters: KinematicBody also has an api for moving objects (the [method move] method) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. @@ -17570,6 +17576,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Move the body in the given direction, stopping if there is an obstacle. The returned vector is how much movement was remaining before being stopped. @@ -17578,6 +17585,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. The returned vector is how much movement was remaining before being stopped. @@ -17593,96 +17601,112 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Return whether the body is colliding with another. + Return the point in space where the body is touching another. If there is no collision, this method will return (0,0,0), so collisions must be checked first with [method is_colliding]. + Return the normal of the surface the body collided with. This is useful to implement sliding along a surface. + Return the velocity of the body that collided with this one. + Return the body that collided with this one. + Return the shape index from the body that collided with this one. If there is no collision, this method will return 0, so collisions must be checked first with [method is_colliding]. + Set if this body should collide with static bodies. + Return if this body can collide with static bodies. + Set if this body should collide with kinematic bodies. + Return if this body can collide with kinematic bodies. + Set if this body should collide with rigid bodies. + Return if this body can collide with rigid bodies. + Set if this body should collide with character bodies. + Return if this body can collide with character bodies. + Set the collision margin for this object. A collision margin is an amount that all shapes will grow when computing collisions, to account for numerical imprecision. + Return the collision margin for this object. @@ -17705,7 +17729,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) - Move the body in the given direction, stopping if there is an obstacle. + Move the body in the given direction, stopping if there is an obstacle. The returned vector is how much movement was remaining before being stopped. @@ -17714,7 +17738,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) - Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. + Move the body to the given position. This is not a teleport, and the body will stop if there is an obstacle. The returned vector is how much movement was remaining before being stopped. @@ -23541,8 +23565,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + A node used to create a parallax scrolling background. + A ParallaxBackground will use one or more [ParallaxLayer] nodes to create a parallax scrolling background. Each [ParallaxLayer] can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game. @@ -23561,60 +23587,70 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Set the base offset in pixels of all children [ParallaxLayer] nodes. + Return the base offset. + Set the base motion scale of all children [ParallaxLayer] nodes. + Return the base motion scale. + Set the left and top limits in pixels for scrolling to begin. If the camera is outside of this limit the background will not continue to scroll. If an axis is greater than or equal to the corresponding axis of limit_end, then it will not limit scrolling for that axis. + Return the beginning limit. + Set the right and bottom limits in pixels for scrolling to end. If the camera is outside of this limit the background will not continue to scroll. If an axis is less than or equal to the corresponding axis of limit_begin, then it will not limit scrolling for that axis. + Return the ending limit. + Set to true for all child [ParallaxLayer] nodes to not be affected by the zoom level of the camera. + Return ignoring camera zoom. @@ -23623,32 +23659,38 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + A parallax scrolling layer to be used with [ParallaxBackground]. + A ParallaxLayer must be the child of a [ParallaxBackground] node. All child nodes will be affected by the parallax scrolling of this layer. + Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera. + Return the motion scale of the ParallaxLayer. + Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring. + Return the mirroring of the ParallaxLayer. @@ -38129,8 +38171,10 @@ This method controls whether the position between two cached points is interpola + A simple cube used for testing in 3D. + The TestCube is a simple 2x2x2 cube with a basic texture. It can be used as a placeholder, to verify how the lighting looks, to test shaders, or any other task you may need a textured model to test with.