From f77227608cb9cb057470005db2b1494a9d283145 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 12 Jan 2023 21:01:51 +0100 Subject: [PATCH] Cleanup .. tip::-s. --- about/faq.md | 4 ---- about/introduction.md | 4 ++-- about/release_policy.md | 6 ++++-- community/contributing/docs_writing_guidelines.md | 3 ++- .../contributing/editor_and_docs_localization.md | 3 ++- community/contributing/pr_workflow.md | 3 ++- development/cpp/custom_modules_in_cpp.md | 3 ++- .../first_2d_game/03.coding_the_player.md | 12 ++++++++---- .../first_2d_game/05.the_main_game_scene.md | 3 ++- .../step_by_step/scripting_first_script.md | 3 ++- index.md | 3 ++- tutorials/2d/2d_movement.md | 6 ++++-- tutorials/3d/baked_lightmaps.md | 3 ++- tutorials/3d/csg_tools.md | 9 ++++++--- tutorials/3d/lights_and_shadows.md | 3 ++- tutorials/3d/occluders.md | 9 ++++++--- .../3d/portals/advanced_room_and_portal_usage.md | 3 ++- tutorials/3d/portals/editing_rooms_and_portals.md | 3 ++- tutorials/animation/introduction.md | 3 ++- tutorials/export/exporting_basics.md | 3 ++- tutorials/export/exporting_for_web.md | 6 ++++-- tutorials/inputs/input_examples.md | 12 ++++++++---- tutorials/math/vector_math.md | 6 ++++-- tutorials/networking/high_level_multiplayer.md | 3 ++- .../physics_interpolation_introduction.md | 3 ++- .../interpolation/using_physics_interpolation.md | 6 ++++-- tutorials/physics/soft_body.md | 6 ++++-- tutorials/physics/using_kinematic_body_2d.md | 6 ++++-- tutorials/plugins/editor/import_plugins.md | 3 ++- tutorials/rendering/multiple_resolutions.md | 3 ++- tutorials/scripting/singletons_autoload.md | 3 ++- 31 files changed, 94 insertions(+), 52 deletions(-) diff --git a/about/faq.md b/about/faq.md index 2bc794e..7dd1800 100644 --- a/about/faq.md +++ b/about/faq.md @@ -1,7 +1,3 @@ -.. meta:: - :keywords: FAQ - - Frequently asked questions ========================== diff --git a/about/introduction.md b/about/introduction.md index 6f4a3c0..3f28a94 100644 --- a/about/introduction.md +++ b/about/introduction.md @@ -3,10 +3,10 @@ Introduction ============ -:: - +``` func _ready(): $Label.text = "Hello world!" +``` Welcome to the official documentation of Godot Engine, the free and open source community-driven 2D and 3D game engine! Behind this mouthful, you will find a diff --git a/about/release_policy.md b/about/release_policy.md index c156bdd..de6da1c 100644 --- a/about/release_policy.md +++ b/about/release_policy.md @@ -34,7 +34,8 @@ term adapted to the complexity of a game engine: feature, or modifying the interface of a given class, even if the rest of the engine API remains backwards compatible. -.. tip:: +Tip: + Upgrading to a new minor version is therefore recommended for all users, but some testing is necessary to ensure that your project still behaves as @@ -48,7 +49,8 @@ term adapted to the complexity of a game engine: Patch versions may include minor new features which do not impact the existing API, and thus have no risk of impacting existing projects. -.. tip:: +Tip: + Updating to new patch versions is therefore considered safe and strongly recommended to all users of a given stable branch. diff --git a/community/contributing/docs_writing_guidelines.md b/community/contributing/docs_writing_guidelines.md index 5099781..05a5c11 100644 --- a/community/contributing/docs_writing_guidelines.md +++ b/community/contributing/docs_writing_guidelines.md @@ -126,7 +126,8 @@ would not make much sense where "replacing" currently is. You may use the progressive tense to describe actions that are continuous in time. Anything like animation or coroutines. -.. tip:: +Tip: + Verbs can turn into adjectival nouns with -ing. This is not a conjugation, so you may use them: `the remaining movement`, diff --git a/community/contributing/editor_and_docs_localization.md b/community/contributing/editor_and_docs_localization.md index 29af0b9..98e7f76 100644 --- a/community/contributing/editor_and_docs_localization.md +++ b/community/contributing/editor_and_docs_localization.md @@ -29,7 +29,8 @@ This page gives an overview of the general translation workflow on Weblate, and some resource-specific instructions on e.g. how to handle some keywords or the localization of images. -.. tip:: +Tip: + Translating all the official Godot content is a massive undertaking, so we advise prioritizing the resources as they are listed above: first the editor diff --git a/community/contributing/pr_workflow.md b/community/contributing/pr_workflow.md index 4443b08..30dea26 100644 --- a/community/contributing/pr_workflow.md +++ b/community/contributing/pr_workflow.md @@ -244,7 +244,8 @@ have made any other changes that have resulted in undesired history, the best op is to use an *interactive rebase* on the upstream branch. See the `dedicated section ( doc_pr_workflow_rebase )` for instructions. -.. tip:: If at any time you want to *reset* a local branch to a given commit or branch, +Tip: + If at any time you want to *reset* a local branch to a given commit or branch, you can do so with `git reset --hard ( commit ID )` or `git reset --hard ( remote>/( branch )` (e.g. `git reset --hard upstream/master`). diff --git a/development/cpp/custom_modules_in_cpp.md b/development/cpp/custom_modules_in_cpp.md index 49b86d4..faff525 100644 --- a/development/cpp/custom_modules_in_cpp.md +++ b/development/cpp/custom_modules_in_cpp.md @@ -464,7 +464,8 @@ know which registered classes belong to the module. You need to list all of your classes here. The classes that you don't list will end up in the main `doc/classes` directory. -.. tip:: +Tip: + You can use Git to check if you have missed some of your classes by checking the untracked files with `git status`. For example:: diff --git a/getting_started/first_2d_game/03.coding_the_player.md b/getting_started/first_2d_game/03.coding_the_player.md index e567cdb..a081366 100644 --- a/getting_started/first_2d_game/03.coding_the_player.md +++ b/getting_started/first_2d_game/03.coding_the_player.md @@ -132,14 +132,16 @@ We can prevent that if we *normalize* the velocity, which means we set its *length* to `1`, then multiply by the desired speed. This means no more fast diagonal movement. -.. tip:: If you've never used vector math before, or need a refresher, you can +Tip: + If you've never used vector math before, or need a refresher, you can see an explanation of vector usage in Godot at `doc_vector_math`. It's good to know but won't be necessary for the rest of this tutorial. We also check whether the player is moving so we can call `play()` or `stop()` on the AnimatedSprite. -.. tip:: `$` is shorthand for `get_node()`. So in the code above, +Tip: + `$` is shorthand for `get_node()`. So in the code above, `$AnimatedSprite.play()` is the same as `get_node("AnimatedSprite").play()`. @@ -161,7 +163,8 @@ gdscript GDScript position.y = clamp(position.y, 0, screen_size.y) ``` -.. tip:: The `delta` parameter in the `process()` function refers to the *frame +Tip: + The `delta` parameter in the `process()` function refers to the *frame length* - the amount of time that the previous frame took to complete. Using this value ensures that your movement will remain consistent even if the frame rate changes. @@ -220,7 +223,8 @@ Note: Play the scene again and check that the animations are correct in each of the directions. -.. tip:: A common mistake here is to type the names of the animations wrong. The +Tip: + A common mistake here is to type the names of the animations wrong. The animation names in the SpriteFrames panel must match what you type in the code. If you named the animation `"Walk"`, you must also use a capital "W" in the code. diff --git a/getting_started/first_2d_game/05.the_main_game_scene.md b/getting_started/first_2d_game/05.the_main_game_scene.md index 75c49a3..f317a5f 100644 --- a/getting_started/first_2d_game/05.the_main_game_scene.md +++ b/getting_started/first_2d_game/05.the_main_game_scene.md @@ -208,7 +208,8 @@ Let's also assign `Main` as our "Main Scene" - the one that runs automatically when the game launches. Press the "Play" button and select `Main.tscn` when prompted. -.. tip:: If you had already set another scene as the "Main Scene", you can right +Tip: + If you had already set another scene as the "Main Scene", you can right click `Main.tscn` in the FileSystem dock and select "Set As Main Scene". You should be able to move the player around, see mobs spawning, and see the diff --git a/getting_started/step_by_step/scripting_first_script.md b/getting_started/step_by_step/scripting_first_script.md index ee2afc7..c800082 100644 --- a/getting_started/step_by_step/scripting_first_script.md +++ b/getting_started/step_by_step/scripting_first_script.md @@ -227,7 +227,8 @@ our sprite's rotation every frame. Here, `rotation` is a property inherited from the class `Node2D`, which `Sprite` extends. It controls the rotation of our node and works with radians. -.. tip:: In the code editor, you can ctrl-click on any built-in property or +Tip: + In the code editor, you can ctrl-click on any built-in property or function like `position`, `rotation`, or `process` to open the corresponding documentation in a new tab. diff --git a/index.md b/index.md index c1f8f56..ccf21ed 100644 --- a/index.md +++ b/index.md @@ -8,7 +8,8 @@ Godot Docs – *3.5* branch Expand the "Read the Docs" panel at the bottom of the sidebar to see the list. - .. tip:: This is the documentation for the 3.5 branch. + Tip: + This is the documentation for the 3.5 branch. Looking for the documentation of the current **development** branch? `Have a look here ( https://docs.godotengine.org/en/latest )`. You can also browse the documentation for the current stable diff --git a/tutorials/2d/2d_movement.md b/tutorials/2d/2d_movement.md index 9eaed59..a101cd9 100644 --- a/tutorials/2d/2d_movement.md +++ b/tutorials/2d/2d_movement.md @@ -72,7 +72,8 @@ due to the two directions being added together. We can prevent that if we *normalize* the velocity, which means we set its *length* to `1`, and multiply by the desired speed. -.. tip:: If you've never used vector math before, or need a refresher, +Tip: + If you've never used vector math before, or need a refresher, you can see an explanation of vector usage in Godot at `doc_vector_math`. Note: @@ -209,7 +210,8 @@ repeat. Uncommenting the `look_at()` line will also turn the body to point in its direction of motion if you prefer. -.. tip:: This technique can also be used as the basis of a "following" character. +Tip: + This technique can also be used as the basis of a "following" character. The `target` position can be that of any object you want to move to. Summary diff --git a/tutorials/3d/baked_lightmaps.md b/tutorials/3d/baked_lightmaps.md index a5e7c08..ced11b0 100644 --- a/tutorials/3d/baked_lightmaps.md +++ b/tutorials/3d/baked_lightmaps.md @@ -358,7 +358,8 @@ The Light Data resource can be edited to adjust two additional properties: and will use light probes for ambient lighting exclusively. If disabled, both environment lighting and light probes are used to light up dynamic objects. -.. tip:: +Tip: + The generated EXR file can be viewed and even edited using an image editor to perform post-processing if needed. However, keep in mind that changes to diff --git a/tutorials/3d/csg_tools.md b/tutorials/3d/csg_tools.md index 9b9fede..41c34fd 100644 --- a/tutorials/3d/csg_tools.md +++ b/tutorials/3d/csg_tools.md @@ -118,7 +118,8 @@ Prototyping a level We will prototype a room to practice the use of CSG tools. -.. tip:: Working in **Orthogonal** projection gives a better view when combining +Tip: + Working in **Orthogonal** projection gives a better view when combining the CSG shapes. Our level will contain these objects: @@ -131,7 +132,8 @@ Our level will contain these objects: Create a scene with a Spatial node as root node. -.. tip:: The default lighting of the environment doesn't provide clear shading +Tip: + The default lighting of the environment doesn't provide clear shading at some angles. Change the display mode using **Display Overdraw** in the 3D viewport menu, or add a DirectionalLight node to help you see clearly. @@ -284,7 +286,8 @@ into the **Texture** property. Now, unfold the **Uv1** section and check playing with the **Scale** and **Offset** properties just above. Higher values in the **Scale** property will cause the texture to repeat more often. -.. tip:: You can copy a SpatialMaterial to reuse it across CSG nodes. To do so, +Tip: + You can copy a SpatialMaterial to reuse it across CSG nodes. To do so, click the dropdown arrow next to a material property in the Inspector and choose **Copy**. To paste it, select the node you'd like to apply the material onto, click the dropdown arrow next to its material diff --git a/tutorials/3d/lights_and_shadows.md b/tutorials/3d/lights_and_shadows.md index d6e8575..0db255f 100644 --- a/tutorials/3d/lights_and_shadows.md +++ b/tutorials/3d/lights_and_shadows.md @@ -66,7 +66,8 @@ Finally, if gaps can't be solved, the **Contact** option can help (at a performa Any sort of bias issues can always be fixed by increasing the shadow map resolution, although that may lead to decreased performance. -.. tip:: +Tip: + If shadow biasing is a problem in your scene, the following settings are a good starting point: diff --git a/tutorials/3d/occluders.md b/tutorials/3d/occluders.md index e381b4f..d6cad00 100644 --- a/tutorials/3d/occluders.md +++ b/tutorials/3d/occluders.md @@ -16,7 +16,8 @@ The reason that Occluder nodes are so cheap in performance terms is that the eng The Occluder node itself is a holder for an OccluderShape resource, which determines the functionality. To get started, add an Occluder node to your scene tree. -.. tip:: You will see a yellow warning triangle that lets you know that you must set an OccluderShape from the inspector before the `Occluder` becomes functional. +Tip: + You will see a yellow warning triangle that lets you know that you must set an OccluderShape from the inspector before the `Occluder` becomes functional. OccluderShapeSphere ------------------- @@ -37,7 +38,8 @@ The sphere will appear as a small pink spherical object in the editor window. Th Although you can change the position of the sphere using the Occluder Node transform in the inspector, this moves *the entire array* of spheres. When you want to use multiple spheres in one occluder, the handles do this job. In order to allow positioning in 3D, the gizmo will only move the 3D position in the two principal axes depending on the viewpoint in the editor. This is easier for you to get the hang of by trying it out than by explanation. -.. tip:: There is one more handy function in the editor when using multiple spheres. If you click the `Center Node` toolbar button it will recalculate the local positions of the spheres relative to the average of the entire node, and change the transform of the Occluder Node. This is a handy convenience function to make it easier to place them. +Tip: + There is one more handy function in the editor when using multiple spheres. If you click the `Center Node` toolbar button it will recalculate the local positions of the spheres relative to the average of the entire node, and change the transform of the Occluder Node. This is a handy convenience function to make it easier to place them. At runtime the spheres can be switched on and off changing the Occluder node visibility, and the Node can be moved and scaled and rotated etc. @@ -95,7 +97,8 @@ The main limitation of holes is that there can only be one per polygon. If you h - Combine the area of the two holes into one bigger hole (if they are close together). - Use two or more OccluderPolygons. -.. tip:: Remember that if you are using more than one polygon, they can overlap, and you should use this to your advantage. +Tip: + Remember that if you are using more than one polygon, they can overlap, and you should use this to your advantage. How many Occluder polys are needed? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tutorials/3d/portals/advanced_room_and_portal_usage.md b/tutorials/3d/portals/advanced_room_and_portal_usage.md index b80d861..aff71ea 100644 --- a/tutorials/3d/portals/advanced_room_and_portal_usage.md +++ b/tutorials/3d/portals/advanced_room_and_portal_usage.md @@ -62,7 +62,8 @@ This is an example of a simple RoomGroup script to turn on and off a Directional ![](img/roomgroup_notification.png) -.. tip:: You can apply the same technique for switching on and off weather effects, skyboxes and much more. +Tip: + You can apply the same technique for switching on and off weather effects, skyboxes and much more. diff --git a/tutorials/3d/portals/editing_rooms_and_portals.md b/tutorials/3d/portals/editing_rooms_and_portals.md index 3b5df68..4e2c11b 100644 --- a/tutorials/3d/portals/editing_rooms_and_portals.md +++ b/tutorials/3d/portals/editing_rooms_and_portals.md @@ -68,7 +68,8 @@ Manual bounds Manual bounds are a way of explicitly setting the convex hull for a room, and are used if they are present as children of a room in the scene tree. Aside from the postfix, the naming is unimportant. They should be meshes (i.e. MeshInstance in Godot). Bear in mind they will be converted to convex hulls during the conversion process, so they don't have to be perfect. -.. tip:: Once used during conversion, they will be converted to the `IGNORE` **Portal Mode** and won't be shown. You can alternatively use **Generate Points** within the editor to convert these to a set of points stored in the room, and delete the original `-bound` MeshInstance. +Tip: + Once used during conversion, they will be converted to the `IGNORE` **Portal Mode** and won't be shown. You can alternatively use **Generate Points** within the editor to convert these to a set of points stored in the room, and delete the original `-bound` MeshInstance. Portal point editing ~~~~~~~~~~~~~~~~~~~~ diff --git a/tutorials/animation/introduction.md b/tutorials/animation/introduction.md index 322a679..4252189 100644 --- a/tutorials/animation/introduction.md +++ b/tutorials/animation/introduction.md @@ -92,7 +92,8 @@ to the node and the affected property. Example of Normal animation tracks -.. tip:: +Tip: + If you animate the wrong property, you can edit a track's path anytime. Double click on it and type the new path. Play the animation using the diff --git a/tutorials/export/exporting_basics.md b/tutorials/export/exporting_basics.md index 97e9330..fdedf23 100644 --- a/tutorials/export/exporting_basics.md +++ b/tutorials/export/exporting_basics.md @@ -218,7 +218,8 @@ Note: Android ~~~~~~~ -.. tip:: +Tip: + Mobile devices come with a wide variety of capabilities. In most cases, Godot's default settings will work, but mobile development is sometimes more diff --git a/tutorials/export/exporting_for_web.md b/tutorials/export/exporting_for_web.md index 7c9737c..92a8d9f 100644 --- a/tutorials/export/exporting_for_web.md +++ b/tutorials/export/exporting_for_web.md @@ -101,7 +101,8 @@ of limitations you should be aware of when porting a Godot game to the web. page is served via a secure HTTPS connection (localhost is usually exempt from such requirement). -.. tip:: Check the `list of open HTML5 issues on GitHub +Tip: + Check the `list of open HTML5 issues on GitHub ( https://github.com/godotengine/godot/issues?q=is:open+is:issue+label:platform:html5 )` to see if the functionality you're interested in has an issue yet. If not, open one to communicate your interest. @@ -323,7 +324,8 @@ platforms other than HTML5, calling `JavaScript.eval` will also return else: print("The JavaScript singleton is NOT available") -.. tip:: GDScript's multi-line strings, surrounded by 3 quotes `"""` as in +Tip: + GDScript's multi-line strings, surrounded by 3 quotes `"""` as in `my_func3()` above, are useful to keep JavaScript code readable. The `eval` method also accepts a second, optional Boolean argument, which diff --git a/tutorials/inputs/input_examples.md b/tutorials/inputs/input_examples.md index 291b399..26d48ed 100644 --- a/tutorials/inputs/input_examples.md +++ b/tutorials/inputs/input_examples.md @@ -91,7 +91,8 @@ It inherits from the following classes: - `InputEventMouse` - adds mouse event properties, such as `position` - `InputEventMouseButton` - contains the index of the button that was pressed, whether it was a double-click, etc. -.. tip:: It's a good idea to keep the class reference open while you're working +Tip: + It's a good idea to keep the class reference open while you're working with events so you can check the event type's available properties and methods. @@ -151,7 +152,8 @@ gdscript GDScript print("T was pressed") ``` -.. tip:: See `@GlobalScope_KeyList ( enum_@GlobalScope_KeyList )` for a list of scancode +Tip: + See `@GlobalScope_KeyList ( enum_@GlobalScope_KeyList )` for a list of scancode constants. Warning: @@ -189,7 +191,8 @@ gdscript GDScript print("T was pressed") ``` -.. tip:: See `@GlobalScope_KeyList ( enum_@GlobalScope_KeyList )` for a list of scancode +Tip: + See `@GlobalScope_KeyList ( enum_@GlobalScope_KeyList )` for a list of scancode constants. Mouse events @@ -263,7 +266,8 @@ If you are using a touchscreen device, you can generate touch events. a mouse click event, and `InputEventScreenDrag` works much the same as mouse motion. -.. tip:: To test your touch events on a non-touchscreen device, open Project +Tip: + To test your touch events on a non-touchscreen device, open Project Settings and go to the "Input Devices/Pointing" section. Enable "Emulate Touch From Mouse" and your project will interpret mouse clicks and motion as touch events. diff --git a/tutorials/math/vector_math.md b/tutorials/math/vector_math.md index 3f48eb7..1486dcd 100644 --- a/tutorials/math/vector_math.md +++ b/tutorials/math/vector_math.md @@ -147,7 +147,8 @@ the velocity to the current position. ![](img/vector_movement1.png) -.. tip:: Velocity measures the **change** in position per unit of time. The +Tip: + Velocity measures the **change** in position per unit of time. The new position is found by adding velocity to the previous position. Pointing toward a target @@ -159,7 +160,8 @@ vector pointing from the tank to the robot. ![](img/vector_subtract2.png) -.. tip:: To find a vector pointing from `A` to `B` use `B - A`. +Tip: + To find a vector pointing from `A` to `B` use `B - A`. Unit vectors ~~~~~~~~~~~~ diff --git a/tutorials/networking/high_level_multiplayer.md b/tutorials/networking/high_level_multiplayer.md index 02de2bd..4f0b811 100644 --- a/tutorials/networking/high_level_multiplayer.md +++ b/tutorials/networking/high_level_multiplayer.md @@ -265,7 +265,8 @@ If `sync` is included, the call can also be made locally. For example, to allow puppetsync func update_position(new_position): position = new_position -.. tip:: You can also use `SceneTree.get_rpc_sender_id()` to have more advanced rules on how an rpc can be called. +Tip: + You can also use `SceneTree.get_rpc_sender_id()` to have more advanced rules on how an rpc can be called. These keywords are further explained in `Synchronizing the game ( doc_high_level_multiplayer_synchronizing )`. diff --git a/tutorials/physics/interpolation/physics_interpolation_introduction.md b/tutorials/physics/interpolation/physics_interpolation_introduction.md index 3ed3586..0669fd4 100644 --- a/tutorials/physics/interpolation/physics_interpolation_introduction.md +++ b/tutorials/physics/interpolation/physics_interpolation_introduction.md @@ -131,4 +131,5 @@ Fixed timestep interpolation In Godot this whole system is referred to as physics interpolation, but you may also hear it referred to as **"fixed timestep interpolation"**, as it is interpolating between objects moved with a fixed timestep (physics ticks per second). In some ways the second term is more accurate, because it can also be used to interpolate objects that are not driven by physics. -.. tip:: Although physics interpolation is usually a good choice, there are exceptions where you may choose not to use Godot's built-in physics interpolation (or use it in a limited fashion). An example category is internet multiplayer games. Multiplayer games often receive tick or timing based information from other players or a server and these may not coincide with local physics ticks, so a custom interpolation technique can often be a better fit. +Tip: + Although physics interpolation is usually a good choice, there are exceptions where you may choose not to use Godot's built-in physics interpolation (or use it in a limited fashion). An example category is internet multiplayer games. Multiplayer games often receive tick or timing based information from other players or a server and these may not coincide with local physics ticks, so a custom interpolation technique can often be a better fit. diff --git a/tutorials/physics/interpolation/using_physics_interpolation.md b/tutorials/physics/interpolation/using_physics_interpolation.md index 45ffc9f..e7b940d 100644 --- a/tutorials/physics/interpolation/using_physics_interpolation.md +++ b/tutorials/physics/interpolation/using_physics_interpolation.md @@ -13,7 +13,8 @@ The first step is to turn on physics interpolation in `ProjectSettings.physics/c It is likely that nothing looks hugely different, particularly if you are running physics at 60 TPS or a multiple of it. However, quite a bit more is happening behind the scenes. -.. tip:: +Tip: + To convert an existing game to use interpolation, it is highly recommended that you temporarily set `ProjectSettings.physics/common/physics_fps( ProjectSettings_property_physics/common/physics_fps )` to a low value such as 10, which will make interpolation problems more obvious. @@ -27,7 +28,8 @@ Setting the transform of objects only within physics ticks allows the automatic Note: If you attempt to set the transform of interpolated objects *outside* the physics tick, the calculations for the interpolated position will be incorrect, and you will get jitter. This jitter may not be visible on your machine, but it *will* occur for some players. For this reason, setting the transform of interpolated objects should be avoided outside of the physics tick. Godot will attempt to produce warnings in the editor if this case is detected. -.. tip:: This is only a *soft-rule*. There are some occasions where you might want to teleport objects outside of the physics tick (for instance when starting a level, or respawning objects). Still, in general, you should be applying transforms from the physics tick. +Tip: + This is only a *soft-rule*. There are some occasions where you might want to teleport objects outside of the physics tick (for instance when starting a level, or respawning objects). Still, in general, you should be applying transforms from the physics tick. Ensure that all indirect movement happens during physics ticks diff --git a/tutorials/physics/soft_body.md b/tutorials/physics/soft_body.md index f51f188..e88fcd7 100644 --- a/tutorials/physics/soft_body.md +++ b/tutorials/physics/soft_body.md @@ -26,7 +26,8 @@ Note: Play the scene to view the simulation. -.. tip:: To improve the simulation's result, increase the `Simulation Precision`, this will give significant improvement at the cost of performance. +Tip: + To improve the simulation's result, increase the `Simulation Precision`, this will give significant improvement at the cost of performance. Cloak simulation ~~~~~~~~~~~~~~~~ @@ -42,7 +43,8 @@ Open the `PlaneMesh` properties and set the size(x: 0.5 y: 1) then set `Subdivid ![](img/softbody_cloak_subdivide.png) -.. tip:: Subdivision generates a more tessellated mesh for better simulations. +Tip: + Subdivision generates a more tessellated mesh for better simulations. Add a `BoneAttachment` node under the skeleton node and select the Neck bone to attach the cloak to the character skeleton. diff --git a/tutorials/physics/using_kinematic_body_2d.md b/tutorials/physics/using_kinematic_body_2d.md index ab451b5..93ab755 100644 --- a/tutorials/physics/using_kinematic_body_2d.md +++ b/tutorials/physics/using_kinematic_body_2d.md @@ -26,7 +26,8 @@ engine physics properties, like gravity or friction. While this means that you have to write some code to create their behavior, it also means you have more precise control over how they move and react. -.. tip:: A `KinematicBody2D` can be affected by gravity and other forces, +Tip: + A `KinematicBody2D` can be affected by gravity and other forces, but you must calculate the movement in code. The physics engine will not move a `KinematicBody2D`. @@ -65,7 +66,8 @@ The `move_and_slide()` method is intended to simplify the collision response in the common case where you want one body to slide along the other. It is especially useful in platformers or top-down games, for example. -.. tip:: `move_and_slide()` automatically calculates frame-based movement +Tip: + `move_and_slide()` automatically calculates frame-based movement using `delta`. Do *not* multiply your velocity vector by `delta` before passing it to `move_and_slide()`. diff --git a/tutorials/plugins/editor/import_plugins.md b/tutorials/plugins/editor/import_plugins.md index fff28cf..3222981 100644 --- a/tutorials/plugins/editor/import_plugins.md +++ b/tutorials/plugins/editor/import_plugins.md @@ -128,7 +128,8 @@ method you return an array of strings to represent each extension that this plugin can understand. If an extension is recognized by more than one plugin, the user can select which one to use when importing the files. -.. tip:: Common extensions like `.json` and `.txt` might be used by many +Tip: + Common extensions like `.json` and `.txt` might be used by many plugins. Also, there could be files in the project that are just data for the game and should not be imported. You have to be careful when importing to validate the data. Never expect the file to be well-formed. diff --git a/tutorials/rendering/multiple_resolutions.md b/tutorials/rendering/multiple_resolutions.md index 9fcfd2a..e7bdc78 100644 --- a/tutorials/rendering/multiple_resolutions.md +++ b/tutorials/rendering/multiple_resolutions.md @@ -217,7 +217,8 @@ to the region outside the blue frame you see in the 2D editor. ![](img/stretch_viewport_expand.gif) -.. tip:: +Tip: + To support both portrait and landscape mode with a similar automatically determined scale factor, set your project's base resolution to be a *square* diff --git a/tutorials/scripting/singletons_autoload.md b/tutorials/scripting/singletons_autoload.md index a258a89..b62556f 100644 --- a/tutorials/scripting/singletons_autoload.md +++ b/tutorials/scripting/singletons_autoload.md @@ -41,7 +41,8 @@ Note: Godot won't make an AutoLoad a "true" singleton as per the singleton design pattern. It may still be instanced more than once by the user if desired. -.. tip:: +Tip: + If you're creating an autoload as part of an editor plugin, consider `registering it automatically in the Project Settings ( doc_making_plugins_autoload )`