Age | Commit message (Collapse) | Author |
|
|
|
|
|
Replace Array return types with TypedArray (part 2)
|
|
|
|
This is a legacy of Godot 2 days before the inspector had support for groups.
"Properties" with a slash in their name can't be accessed from script unless
using `set()`/`get()` so they were not actual properties as far as script
languages are concerned.
Part of #17558.
|
|
|
|
The flag only matters for property definition,
but was also used in _validate_property a lot.
|
|
|
|
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
|
|
|
|
|
|
This makes the intent explicit in each use case.
|
|
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
(order matters) but use is discouraged.
There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
|
|
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
|
|
|
|
|
|
fabriceci/fix-move-and-collide-reported-collisions
Fix wrong collision reported on move_and_collide
|
|
|
|
|
|
|
|
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
|
|
|
|
|
|
|
|
|
|
distance and improve the doc description
|
|
|
|
Happy new year to the wonderful Godot community!
|
|
Makes the API for forces and impulses more flexible, easier to
understand and harmonized between 2D and 3D.
Rigid bodies now have 3 sets of methods for forces and impulses:
-apply_impulse() for impulses (one-shot and time independent)
-apply_force() for forces (time dependent) applied for the current step
-add_constant_force() for forces that keeps being applied each step
Also updated the documentation to clarify the different methods and
parameters in rigid body nodes, body direct state and physics servers.
|
|
|
|
|
|
Reporting rest collision information is needed for move_and_collide and
move_and_slide so floor detection can be done properly, but in the case
of just testing the motion for collision, it makes sense to return false
if the body is able to move all along the path without being stopped.
Updated the logic in test_move and clarified the documentation for
test_move and move_and_collide.
|
|
In all physics servers, body_get_direct_state() now silently returns
nullptr when the body has been already freed or is removed from space,
so the client code can detect this state and invalidate the body rid.
In 2D, there is no change in behavior (just no more errors).
In 3D, the Bullet server returned a valid direct body state when the
body was removed from the physics space, but in this case it didn't
make sense to use the information from the body state.
|
|
This is consistent with other constants that include `NO`,
such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
|
|
Improved RigidDynamicBody linear/angular damping override
|
|
|
|
Damping values are now non-negative.
Add new properties linear_damp_mode and angular_damp_mode to set the way
RigidDynamicBody and PhysicalBone (2D & 3D) use damping values.
It can now be Combine (default) to add to the default/areas, or Replace
to override the value completely (current behavior).
|
|
Improve area/body_shape_entered/exited signals parameter names and doc
|
|
Fix some typoed names from the doc
Add _index to "index" parameters of *_shape_* signals, this is both in doc and in the template. This makes the code, signature and doc easier to understand
Add method to get Node from the _index params of those signals. This was not as easy to find as one would expect. Putting this information where it is needed will help.
|
|
Added a parameter in test_body_motion to exclude attached objects from
collision, used to avoid collision with all TileMap tiles with moving
platform motion instead of just the one tile the character touches.
Same changes made in 3D for consistency, and handling potential similar
cases.
|
|
-Physics servers test body motion use a class to hold parameters instead
of multiple arguments to make it more readable and flexible since there
are many options
-Improved documentation for test body motion and kinematic collision
-Removed read-only properties for body motion results (not handled in
scripts, so they should be get_ methods only instead)
|
|
Fix #53255 when a body gets stuck when it hits a descending platform in 2D/3D
|
|
|
|
|
|
Shape metadata was only used to get tile information when colliding with
tilemaps. It's not needed anymore since there's an API in tilemap using
body ids instead.
|
|
|
|
|
|
_update_kinematic_motion() shouldn't be called in the constructor
It's too early and causes a first call to set the body position to 0.
Then the second call to set the actual position triggers kinematic
motion, colliding with objects on the path to the initial position.
Side effect of sync to physics now enabled by default.
|
|
Clarify RigidDynamicBody modes
|
|
|