53 Commits

Author SHA1 Message Date
Danil Alexeev
3946ede7aa Replace remaining uses of shorthand codeblock syntax, add CI check 2025-07-25 16:20:16 -04:00
Hana - Piralein
cd3e94b4a1 add missing brackets in c sharp code 2025-07-14 20:29:57 +02:00
Max Hilbrunner
813168b8c2 Merge pull request #10943 from Calinou/physics-introduction-bitshift
Use bitshift and binary `OR` operator in to set layers in Physics introduction
2025-06-01 23:05:45 +02:00
Hugo Locurcio
8a6ad4c926 Replace uses of shorthand codeblock syntax to avoid issues with localization
Previously, many paragraphs in the documentation used `::` at the end of a line
as a replacement for a single colon (and `::` on the following line).
Due to this, the `::` was part of the extracted string for localization.
Weblate also showed a warning about the trailing `::`, as it's not
normally expected to be there.

This change requires translators to revalidate all modified strings.
However, considering many of those have broken code blocks due to translators
replacing `::` with `:`, it can be a good idea.

This also adds documentation writing guidelines for code blocks and admonitions.
This commit does not modify existing admonitions in any way (as this would
lead to a much larger diff, and require more localizable text to be revalidated
by translators).
2025-05-30 02:02:30 +02:00
Hugo Locurcio
71d70864b5 Use bitshift and binary OR operator in to set layers in Physics introduction 2025-05-13 00:17:05 +02:00
skyace65
385e1a370c Update Physics introduction images 2025-01-19 11:58:28 -05:00
D4Devil
00c34dd769 Add examples of individually setting bits in Physics introduction (#9910)
Add examples using CollisionObject2D.set_collision_mask_value().

---------

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: tetrapod <145553014+tetrapod00@users.noreply.github.com>
2024-11-19 16:12:23 -08:00
notPelf
00221436f4 Add info about layer mask exporting to physics_introduction.rst (#10242)
* Update physics_introduction.rst

The docs page for raycasting provides a link to the physics introduction page for how to set a collision mask on a raycast created in code. The physics introduction page does not mention export annotations for exporting a collision mask. This pull request adds a brief bit about exporting layer masks, and links to the export annotation docs.

---------

Co-authored-by: tetrapod <145553014+tetrapod00@users.noreply.github.com>
2024-11-17 11:30:23 +01:00
tetrapod00
a8667ffddf Add links to project setting mentions 2024-11-05 11:55:14 -08:00
A Thousand Ships
c6bf5d4c28 [Manual] Clarify use of delta with move_and_slide
Added details to clarify that while `velocity` should not be multiplied
by `delta`, `gravity` still should.
2024-03-06 12:34:29 +01:00
Yuri Sizov
cd92be066d Update references to private class methods across the docs 2023-11-10 16:06:36 +01:00
Jason
8dfddfe490 Fix bug in collision masking bits example 2023-07-11 16:22:46 -04:00
Surya Narayan
5c30e12f9a changed collisionInfo.Normal to collisionInfo.GetNormal() 2023-06-22 18:44:30 -04:00
Raul Santos
c457ab79ec Update some C# examples
- Rename members that have been renamed in Godot's C# API for 4.0.
- Change `delta` parameter type to `double`.
- Ensure parameters match base declaration.
- Follow our code style more closely.
- Other minor code fixes.
2023-05-18 13:14:05 +02:00
VestedGrammar
50f8f10250 Update physics_introduction.rst (#7360)
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-05-17 10:14:39 +02:00
kkoang
7f6a4084fb Update physics_introduction.rst
Fix the code so that it can run normally and correct some of the document errors
2023-05-05 19:27:43 +08:00
kkoang
c7a6bfc834 Update physics_introduction.rst 2023-05-05 03:07:35 +08:00
Jef D
9484261739 Clarify reasons for physics processes (#6825) 2023-03-06 10:46:17 +01:00
Emily
3585c66213 Removed all instances of velocity being defined for CharacterBody2D (#6862)
* Removed all instances of velocity being defined for `CharacterBody2D`
2023-03-03 08:07:15 +01:00
Yuri Sizov
a20c7f494e Merge pull request #6581 from Piralein/partial🔑
Update C# code samples in Getting Started and Tutorials
2023-01-13 15:59:11 +03:00
Hana
9e90766a92 update c# class examples 2023-01-12 19:38:20 +01:00
Max Hilbrunner
322e0f5802 Merge pull request #6466 from kkoang/patch-4
Update physics_introduction.rst
2023-01-11 21:59:17 +01:00
kkoang
6f1977f821 Modify code adaptation 4.0 physics_introduction
Modify code adaptation 4.0 physics_introduction
2022-12-10 23:37:25 +08:00
kkoang
6bae3e2cf0 Update physics_introduction.rst
small fix
2022-12-08 23:24:27 +08:00
Max Hilbrunner
99d3d0be12 Renames / fixes for Godot 4 2022-10-17 00:35:07 +02:00
Max Hilbrunner
024fedb0f3 Kinematic -> Character 2022-10-15 17:55:24 +02:00
jarommadsen
a7f79134a1 Remove obsolete C# methods from Using RigidBody2D (#5957) 2022-07-29 21:40:27 +02:00
vratajin
d330568d32 Fix invalid variable name in C# example in Physics introduction (#5809) 2022-05-07 22:04:48 +02:00
snailrhymer
4ffb42abbb Fix a typo in Physics introduction (#5778) 2022-04-27 01:17:39 +02:00
Rémi Verschelde
044b6a74f8 Cleanup uses of double spaces between words or after punctuation 2021-06-07 10:44:02 +02:00
Matthew
b999f71b09 Document physics material (#4817) 2021-04-06 09:54:10 +02:00
GuangGuang
6eb4c3d6f2 Fix collision layer math formula in Physics introduction (#4598) 2021-01-29 15:43:30 +01:00
Hauke
f22934fb2d make example asteroids spaceship fly up/forward 2020-11-04 21:58:06 +01:00
Hugo Locurcio
f3e24e46b7 Fix code block formatting and reference in Physics introduction 2020-08-03 13:54:08 +02:00
balloonpopper
c40d74e19b Added examples for collision layer masks (#3863)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-authored-by: Balloonpopper <balloonpopper@git.com>
2020-08-03 13:47:40 +02:00
Hugo Locurcio
942352738e Explain what delta is in Physics introduction
This closes #3627.
2020-06-02 22:14:30 +02:00
skyace65
6d34767fd4 Fix C# issues in intro to physics 2020-05-18 11:44:45 -04:00
Chris Bradfield
41b67909fe Minor tutorial fixes for 3.1 2019-03-20 18:35:40 -07:00
Rémi Verschelde
aa7a9f8675 Misc heading fixes 2019-01-08 11:30:55 +01:00
Rémi Verschelde
a1af0dfc13 Adapt tutorial hyperlinks after godotengine/godot#24640 2019-01-07 11:43:18 +01:00
corrigentia
15a137ea48 Fix punctuation in physics_introduction
Fix punctuation in physics_introduction.
2018-12-20 11:25:30 +02:00
Rémi Verschelde
4ef06a4135 Removing trailing whitespace
With `sed -i $(rg -l '[[:blank:]]*$' -g'!classes') -e 's/[[:blank:]]*$//g'`
2018-11-20 11:08:34 +01:00
Rémi Verschelde
a0e32ac017 Fix mixed use of tabs and spaces in indented blocks
4-space is our convention for indented blocks and should be used consistently.
The only exception is for C++ code which is tab-indented, as the engine code.
2018-11-20 11:02:11 +01:00
mhilbrunner
f215a0cf26 Proofing/review: Remove filler words, adhere to style guide 2018-05-06 05:23:37 +02:00
Michael Alexsander Silva Dias
ffea7766f5 Fixed broken reference in the physics introduction page. 2018-04-05 12:42:00 -03:00
Paul Joannon
790a866d17 Translate Tutorials/Physics to C# 2018-04-05 14:51:50 +02:00
Andrea Catania
d9ddd643af Added rigid body doc 2018-04-02 10:23:01 +02:00
Chris Bradfield
530fb1cbb2 Physics intro: Fixed typo 2018-02-25 19:55:11 -08:00
Chris Bradfield
112ad104ee Rewrite of physics introduction 2018-02-23 22:14:33 -08:00
walomator
b624339788 Change move() to move_and_slide() 2018-02-18 14:35:52 +01:00