Hugo Locurcio
74aeab5385
Increase size of WorldBoundaryShape to be much larger
...
The size was previously 20,000 pixels or units, which could be easily
reached in many projects. It is now 2,000,000,000,000,000 pixels or units,
which is larger than the supported coordinate space with a single-precision
build, and still very large in a double precision build.
2024-04-16 18:26:46 +02:00
Thaddeus Crews
9903e6779b
Enforce template syntax typename
over class
2024-03-07 22:39:09 -06:00
Ricardo Buring
87446fd9b3
GodotCollisionSolver2D::solve_concave: fix culling in case of motion
2024-02-13 14:42:09 +01:00
A Thousand Ships
684752e75b
Replace error checks against size
with is_empty
2024-02-09 12:50:15 +01:00
Yuri Sizov
6b403712f1
Merge pull request #83655 from golfinq/small-capsule-shape-fix
...
Replace confusing code in GodotCapsuleShape2D::get_supports
2023-12-22 17:19:48 +01:00
Occalepsus
492f1c2406
Fix body leaving area gravity influence
2023-12-21 16:10:02 +01:00
风青山
ea30aabfb1
Clear monitoring in Area*
when its space changes to invalid
...
So that it can work properly when the space changes to valid again.
Change `space` in advance to prevent disabled areas from being queried again.
2023-12-15 20:54:54 +01:00
golfinq
e03a65fdea
replace confusing code in CapsuleShape2D
2023-10-20 18:08:27 -04:00
Rémi Verschelde
a1d7c62df7
Merge pull request #83003 from AThousandShips/null_check_extra
...
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-10-09 15:37:14 +02:00
A Thousand Ships
f18aa00e85
Replace ERR_FAIL_COND
with ERR_FAIL_NULL
where applicable
2023-10-08 17:23:33 +02:00
Mai Lavelle
5e15586ec2
Fixes to allow object-less callables throughout Godot
...
This fixes #81887
2023-10-06 16:31:35 -04:00
kobewi
09b30be86d
Add vararg call() method to C++ Callable
2023-10-05 11:35:29 +02:00
Rémi Verschelde
2c8c7b95aa
Merge pull request #82313 from AThousandShips/null_check_servers
...
[Servers] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-09-26 13:45:31 +02:00
Rémi Verschelde
eefe161549
Merge pull request #81610 from Ughuuu/add-angle-limits-and-motor-to-pin-joint-2d
...
Update PinJoint2D API with angle limits and motor speed
2023-09-26 13:45:07 +02:00
Dragos Daian
0fcfb07246
Update PinJoint2D API with angle limits and motor speed
...
add enabled methods for motor and angular limits
use correct name to get joint
update copyright
2023-09-26 10:29:23 +02:00
A Thousand Ships
fdd3d36c6d
[Servers] Replace ERR_FAIL_COND
with ERR_FAIL_NULL
where applicable
2023-09-25 18:45:30 +02:00
Crimzoth
3bab21fdd7
Fix: Mass not set properly for RigidBody
...
Removed erroneous check, which caused _inv_mass not to be calculated when RigidBody2D or RigidBody3D used both custom center of mass and custom inertia.
2023-06-27 18:56:38 +02:00
Rémi Verschelde
7ff0a3086d
Merge pull request #76138 from rburing/ccd_against_moving
...
Improve rigid body CCD against moving bodies
2023-06-19 22:34:16 +02:00
Black-Cat
d710af2e97
Fix precision in physics supports generation
...
Lower threshold for dot was (1.0 - threshold) which is incorrect.
Patch changes it to correct version sqrt(1.0 - threshold * threshold)
Co-authored-by: Ricardo Buring <ricardo.buring@gmail.com>
2023-04-29 12:12:10 +01:00
Ricardo Buring
47c5b8bafc
Improve rigid body CCD against moving bodies
2023-04-16 19:46:33 +02:00
Ricardo Buring
aacb20437a
PhysicsDirectBodyState2D: add get_contact_local_velocity_at_position
2023-04-14 11:40:06 +02:00
myaaaaaaaaa
6f88392d02
Move some worker_thread_pool.h includes out of header files
2023-02-13 14:02:01 -05:00
Rémi Verschelde
b7c0f613b5
Merge pull request #66076 from Sauermann/fix-double-physics-input-events-for-layers
...
Fix physics events being interpreted twice for nodes in canvas layer
2023-02-01 07:29:16 +01:00
Markus Sauermann
7e056f1b37
Fix physics events being interpreted twice when in canvas layer
2023-01-31 23:14:57 +01:00
smix8
026549db2e
Create default World physics spaces on demand only
...
Changes that the default physics spaces of World resources are only created on first use.
2023-01-31 18:26:52 +01:00
Aaron Franke
79215131b5
Replace Area gravity point distance scale with unit distance
2023-01-29 22:12:00 -06:00
Aaron Franke
866e2b95dc
Remove deprecated AREA_PARAM_GRAVITY_POINT_ATTENUATION
2023-01-29 22:12:00 -06:00
Ricardo Buring
3efa105548
Add get_contact_impulse method to PhysicsDirectBodyState2D
...
This makes it consistent with 3D.
2023-01-10 23:28:02 +01:00
Rémi Verschelde
163f6f5fe8
Merge pull request #68429 from KoBeWi/PropertySettings
...
Add PropertyInfo overload for GLOBAL_DEF
2023-01-06 22:59:29 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
...
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".
2023-01-05 13:25:55 +01:00
Geekotron
ae55229618
Fix regression 70154 caused by my prior CCD fix.
...
At high velocities `from - motion *.1` is *behind the RB* - not within its collider as the comment suggested - so it could not be used for determining movement length
2022-12-16 11:39:19 -07:00
Geekotron
57710897d6
Fix Physics3D and Physics2D CCD sometimes adjusting velocity too much (preventing collision) or not enough (allowing tunneling)
2022-12-13 18:01:21 -07:00
kobewi
7c6b659bd7
Add PropertyInfo overload for GLOBAL_DEF
2022-12-11 21:36:48 +01:00
Rémi Verschelde
de6994aa95
Merge pull request #69674 from rburing/conStraint
...
Fix typo in physics step: contraint -> constraint
2022-12-07 13:25:28 +01:00
Ricardo Buring
53e90bd6ca
Fix typo in physics step: contraint -> constraint
2022-12-06 17:32:45 +01:00
Ricardo Buring
29ab86aa7d
Fix collision detection for degenerate capsules
...
In GodotCapsuleShape3D::get_supports and
GodotCapsuleShape2D::get_supports, return a point instead of an edge of
length zero in case the capsule degenerates to a sphere or circle.
2022-12-06 14:17:24 +01:00
kobewi
d9f066d5fa
Remove duplicate project settings definitions
2022-11-08 01:29:39 +01:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4.
2022-10-07 11:32:33 +03:00
Rémi Verschelde
5b6ccf2fd2
Merge pull request #66720 from qarmin/unintialized_memory
...
Remove usage of unitialized variables
2022-10-05 11:42:47 +02:00
Rafał Mikrut
2233624152
Remove usage of unitialized variables
2022-10-01 21:09:22 +02:00
Haoyu Qiu
8320e12ac1
Fix crash when executing PhysicsServer2D.joint_clear
2022-09-30 10:36:05 +08:00
bruvzg
ea1848ce0a
Use constexpr
in the conditions with template parameters and sizeof
s to suppress C4127 warnings.
2022-09-29 10:38:21 +03:00
Rémi Verschelde
e5857bd6c7
Merge pull request #66548 from akien-mga/msvc-warnings-c4701-c4703
...
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
2022-09-28 20:47:50 +02:00
Rémi Verschelde
85fe6ecc32
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
2022-09-28 17:05:34 +02:00
Rémi Verschelde
7ab01450cf
Fix MSVC warning C4702: unreachable code
...
Part of #66537 .
2022-09-28 16:46:48 +02:00
Mansur Isaev
efd4dc20a3
Add area_get_collision_layer
and area_get_collision_mask
2022-09-25 14:34:35 +04:00
Rémi Verschelde
28e1dc6162
Merge pull request #65828 from rburing/body_state_sync_callable
...
make `body_set_state_sync_callback` take a `Callable`
2022-09-21 11:05:41 +02:00
fabriceci
7a15ccfa7b
Warn users when collisions are not supported
2022-09-19 16:51:41 +02:00
Ricardo Buring
ff4e72a0bc
PhysicsServer2D and PhysicsServer3D: make body_set_state_sync_callback take a Callable
...
Prefer Callable to a C-style callback. This is helpful for GDExtension.
2022-09-15 15:09:23 +02:00
Rémi Verschelde
6fd3f6a287
Merge pull request #65048 from rburing/solve_static_world_boundary_motion_2d
2022-09-14 23:13:35 +02:00