Updating the floor velocity with the body's current linear velocity
discards the velocity component provided by the body's angular
rotation. Without the current contact point there is no way to calculate
the current velocity component provided by the body's angular rotation
therefore we need to use the velocity calculated at the time of the
collision.
Fixes#34807.
Happy new year to the wonderful Godot community!
We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.
Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
In the 3D version:
- Partially revert #20908 that was reverted in the 2D version as part
of #21653. This ensures that the Vector returned is always perpendicular
to the surface collided with; and not the floor_normal Vector passed to
the function when on a floor.
- Include an update of the floor velocity before multiplying by the time
delta, which was added to the 2D version as part of commit 13a8014.
In the 2D version:
- Use the Vector2.slide() function instead of Vector2.tangent() to adjust
the amount of motion the stop_on_slope undoes to ensure that it is in the
right direction. This is a implementation of the 3D approach from #30588.
- Combine the !found_collision and motion == Vector2() checks for break.
- Other minor formating changes to make the functions look identical.
Also renamed some variables to align with their use.
It was triggering a warning in bullet followed with a crash in some cases.
WARNING: assert_no_constraints: A body with a joints is destroyed. Please check the implementation in order to destroy the joint before the body.
At: modules/bullet/rigid_body_bullet.cpp:465
A z_depth of 0 returns the camera position, which is not really useful.
This also makes the API breakage from 3.1 clearer as 3.1 code will now
fail to compile, so users will have to adapt and use the new parameter.
For the reference, in 3.1, the z_depth was hardcoded to the near plane.
Closes#33493.
Make sure particles are processed during the same frame when visibility is set to on, in case they are still active from before and need to be restarted.
Fixed#33476
Particles were processed only on the next frame after the emission started, causing a one frame delay in rendering. Now the first process cycle is started during the same frame, which makes them consistent with Particles & Particles2D.
Fixes#32890
Adds a new NavigationMesh property to select which objects will be taken
into account for the generation.
By default it will use all the NavigationMeshInstance children to keep
compatibility. The new modes allow to build the NavigationMesh from
all the nodes belonging to a specific group, and optionally include
their children too.