Age | Commit message (Collapse) | Author |
|
|
|
Changes that the default physics spaces of World resources are only created on first use.
|
|
|
|
|
|
Add PropertyInfo overload for GLOBAL_DEF
|
|
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
|
|
|
|
|
|
Also update the documentation to refer to the get_rid() method.
|
|
Change type of exclude property from `Vector<RID>` to `TypedArray<RID>` which is consistent with the 2D version.
|
|
|
|
|
|
This exposes PhysicsServer2DManager and PhysicsServer3DManager.
|
|
|
|
|
|
Co-authored-by: Juan Linietsky <reduzio@gmail.com>
|
|
|
|
|
|
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
|
|
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!
|
|
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
|
|
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support)
* Some changes on native struct binding for PhysicsServer
This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
|
|
|
|
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.
|
|
Helps with discovery and setup of physics solver settings, in a specific
project settings section for both 2D and 3D.
Other changes for cleanup:
-Removed unused space parameters in 3D
SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO
SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS
-Added custom solver bias for Shape3D (same as Shape2D)
-Improved documentation for solver settings
|
|
Clarified space parameters for contacts and added missing ones.
List of changes:
-Add contact bias to space parameters
-Add solver iterations to space parameters, instead of a specific
physics server function
-Renamed BODY_MAX_ALLOWED_PENETRATION to CONTACT_MAX_ALLOWED_PENETRATION
to make it consistent with other contact parameters
|
|
Separate space override modes for gravity/damping in Area
|
|
Makes the results consistent for all shape types with options to set
the desired behavior.
|
|
Also make inspector clearer for gravity point properties.
|
|
Expose local center of mass in physics servers
|
|
Center of mass in body's local space is more useful than the transformed
one in some cases, like drawing its position for debug.
It's especially useful to get the generated local center of mass when
in auto mode (by default).
Physics Server BODY_PARAM_CENTER_OF_MASS:
Now always returns the local center of mass, instead of setting a local
center of mass and getting a transformed one.
This causes compatibility breaking, but it makes more sense for the
parameter to be consistent between getter and setter.
Direct Body State:
There are now two properties, because both of them can be useful in
different situations.
center_of_mass: relative position in global coordinates (same as before)
center_of_mass_local: position in local coordinates
|
|
Same as what is already done for shape queries, applied to point and ray
queries. Easier to document and more flexible to add more parameters.
Also expose intersect_point method to script in 3D.
Remove intersect_point_on_canvas in 2D, replaced with a parameter.
|
|
|
|
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).
|
|
While at it, tweak some boolean setters to use `p_enabled` for the bool.
Also renames `draw_minimap()` to `set_draw_minimap()`.
|
|
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)
|
|
|
|
Clarify RigidDynamicBody modes
|
|
Allows 2D character controller to work without applying gravity when
touching the ground (also more safely in 3D), and collision detection
is more flexible with different safe margin values.
Character body motion changes in 2D and 3D:
-Recovery only for depth > min contact depth to help with collision
detection consistency (rest info could be lost if recovery was too much)
-Adaptive min contact depth (based on margin) instead of space parameter
Extra CharacterBody changes:
-2D: apply changes made in 3D for stop on slope and floor snap that help
fixing some jittering cases
-3D: fix minor inconsistencies in stop on slope and floor snap logic
|
|
Co-authored-by: Camille Mohr-Daurat <pouleyketchoup@gmail.com>
|
|
RigidDynamicBody modes are replaced with several properties to make their
usage clearer:
-lock_rotation: disable body's rotation (instead of MODE_LOCKED)
-freeze: no gravity or forces (instead of MODE_STATIC and MODE_KINEMATIC)
-freeze_mode: Static (can be only teleported) or Kinematic (can be animated)
Also renamed MODE_DYNAMIC_LOCKED to MODE_DYNAMIC_LINEAR in the physics
servers.
|
|
|
|
Changes:
-Added support for custom inertia and center of mass in 3D
-Added support for custom center of mass in 2D
-Calculated center of mass from shapes in 2D (same as in 3D)
-Fixed mass properties calculation with disabled shapes in 2D/3D
-Removed first_integration which is not used in 2D and doesn't seem to
make a lot of sense (prevents omit_force_integration to work during the
first frame)
-Support for custom inertia on different axes for RigidBody3D
|
|
The default mask for queries was 0, 0x7FFFFFFF or 0xFFFFFFFF depending
on the cases.
Now always using 0xFFFFFFFF (in the form of UINT32_MAX to make it clear)
in order to use all layers by default.
|
|
Makes it clearer that it's used for special cases when picking a
collision shape.
|
|
Make separation ray shapes work properly in move_and_slide, wihtout the
specific code in CharacterBody like before.
Now most of the logic is handled inside the physics server. The only
thing that's needed is to use ray shapes only for recovery and ignore
them when performing the motion itself (unless we're snapping or slips
on slope is on).
|
|
Partial revert from previously removing ray shapes completely, added
back as a shape type but without the specific character controller code.
|