Commit graph

28911 commits

Author SHA1 Message Date
PouleyKetchoupp
9cefab24e0 Fix test_body_motion recovery
This change makes test_body_motion more reliable when the kinematic body
recovers from being stuck.

- When recovery occurs, the rest information is generated, in order to
make sure collision results from test_move, move_and_collide and
move_and_slide are consistent and return a collision in case of overlap.

- The new calculation for recovery vector makes sure the recovery is
never more than the overlap depth between shapes.
This can help with cases where the kinematic body overlaps with several
shapes.
Recovery is made iteratively, without forcing a full overlap at each
step. This helps with getting proper rest information when recovery
occurs.

- One Way Collision:
When attempting motion, contact direction is checked against motion
before skipping in order to solve cases where kinematic bodies can sink
into one-way collision shapes.
Rest info now sets max contact depth in order to properly handle one-way
collision.

- Low speed motion is now handled in the rest info, by never setting
min_allowed_depth lower than motion length.
Separation is always applied with full margin, otherwise contact is lost
when low speed motion occurs right after higher speed motion.

- Similar changes are applied to 3D in order to make 2D and 3D
consistent.
2021-02-17 18:27:38 -07:00
Rémi Verschelde
3541d13095
Merge pull request #46060 from nekomatata/text-edit-style-content-margins-3.2
[3.2] TextEdit respects content margin from StyleBox
2021-02-15 19:48:35 +01:00
PouleyKetchoupp
018008ce81 TextEdit respects content margin from StyleBox
Backport from PR #45858 on master.
2021-02-15 10:47:38 -07:00
Rémi Verschelde
daf1151b79
Merge pull request #46055 from bruvzg/fix_spacing_space
[3.2] Fix SPACING_SPACE not used for drawing characters.
2021-02-15 17:30:34 +01:00
bruvzg
56fccb1ec1
[3.2] Fix SPACING_SPACE not used for drawing characters. 2021-02-15 18:03:26 +02:00
Rémi Verschelde
40c30adf04
Merge pull request #46034 from bruvzg/ignore_warp_on_mode_change_3
[macOS, 3.2] Ignore mouse move event caused by mouse mode switch.
2021-02-15 11:09:28 +01:00
bruvzg
bc04bbbe2a
[macOS] Ignore mouse move event caused by mouse mode switch. 2021-02-15 00:19:47 +02:00
Rémi Verschelde
db8c2410a4
Merge pull request #46026 from Calinou/project-manager-add-loading-text-3.2
Display loading text while the project manager is loading (3.2)
2021-02-14 17:38:37 +01:00
Hugo Locurcio
f6257e31ed
Display loading text while the project manager is loading
This hints the user that the project manager is currently busy
loading the project. This is important for the HTML5 editor as the
current feedback isn't very obvious.

This also removes the unused `_exit_dialog` function.
2021-02-14 17:02:08 +01:00
Rémi Verschelde
a1222e435f
Merge pull request #45982 from clayjohn/GLES2-max-dims
Check limits on texture or framebuffer creation
2021-02-14 11:53:02 +01:00
Rémi Verschelde
ab252c3723
Merge pull request #45970 from lawnjelly/bvh_fix_mesh_visible
BVH - fix deferred visible mesh collision check
2021-02-14 11:02:34 +01:00
lawnjelly
a814dda2ae BVH - fix deferred visible mesh collision check
When making items visible from the visual server, the collision check is deferred to prevent two identical collision checks when set_pairable is called shortly after.

It turns out that for some items (especially meshes), set_pairable is never called. This PR detects this occurrence and forces a collision check at the end of the routine.
2021-02-14 09:03:26 +00:00
clayjohn
7efcafd057 Check limits on texture or framebuffer creation 2021-02-13 13:36:15 -08:00
Rémi Verschelde
83e4e4dc52
Merge pull request #45902 from Calinou/inputmap-nonexistent-suggestions-3.2
Print suggestions when requesting a nonexistent InputMap action (3.2)
2021-02-12 12:54:06 +01:00
Rémi Verschelde
9918fd722e
Merge pull request #45921 from Faless/js/3.x_dpi
[3.2] [HTML5] Detect screen scale and DPI.
2021-02-12 12:24:36 +01:00
Fabio Alessandrelli
b3f78687de [HTML5] Detect screen scale and DPI.
`OS.get_screen_scale` will now return the `window.devicePixelRatio`
value, `OS.get_screen_dpi` uses CSS media queries to find approximate
DPI value for the current display.
`OS.get_screen_size` also return the actual screen size (not the CSS
pixel size).
2021-02-12 12:02:30 +01:00
Rémi Verschelde
986b1a9b18
CI: Mono glue generation sometimes crashes on exit, ignore it 2021-02-12 11:14:19 +01:00
Emily
92dd573053
fixed typo in packedscene
(cherry picked from commit 7368bc534a)
2021-02-12 11:11:35 +01:00
Rémi Verschelde
10f0be7719
SCons: Fix Godot detection in custom modules logic
`exec()` was not a good idea as it assumes a certain type of `version.py` file
similar to Godot's own file, which is not always a reliable assumption (see
https://github.com/godotengine/godot/pull/43057#issuecomment-777632900).

Also restores Python 2 support for the 3.2 branch.

(cherry picked from commit 75910d1e9b)
2021-02-12 11:09:40 +01:00
Rémi Verschelde
e71510097d
Merge pull request #45837 from Kayomn/3.2
Accomodate blend shape ranges of -1 to +1 for GLES
2021-02-12 09:28:19 +01:00
Hugo Locurcio
28127ce224
Print suggestions when requesting a nonexistent InputMap action
Co-authored-by: Marc Gilleron <marc.gilleron@gmail.com>
2021-02-11 18:00:26 +01:00
Rémi Verschelde
9a89782996
Merge pull request #45892 from akien-mga/3.2-cherrypicks
Cherry-picks for the 3.2 branch (future 3.2.4) - 22nd batch
2021-02-11 15:18:14 +01:00
Fabio Alessandrelli
5abe08f484
[HTML5] Editor: ensure canvas focus when switching tabs.
(cherry picked from commit b148ea2a64)
2021-02-11 13:17:08 +01:00
Kongfa Waroros
adb93d7120
Update GraphEdit when GraphNode's slot is updated
(cherry picked from commit fe6c8d48e6)
2021-02-11 13:14:33 +01:00
Ryan Roden-Corrent
08d556f677
Clarify EditorImportPlugin.get_visible_name.
According to the docs at
https://docs.godotengine.org/en/stable/tutorials/plugins/editor/import_plugins.html#the-editorimportplugin-class

> The get_visible_name() method is responsible for returning the name of
> the type it imports and it will be shown to the user in the Import dock.
> You should choose this name as a continuation to "Import as", e.g.
> "Import as Silly Material"

I've verified Godot's behavior reflects this, so the code examples
should reflect this.

Also document propagating save error in EditorImportPlugin.

It seems that the suggested code ignores any error from
`ResourceSaver.save`, but I think we should return it.

(cherry picked from commit 9676650f2f)
2021-02-11 13:12:06 +01:00
Fabio Alessandrelli
cd2a996d9e
[HTML5] Fix web editor "clear persistent data".
Was broken after update to new persistent path "/home/web_user".

(cherry picked from commit 7866cd5881)
2021-02-11 13:12:06 +01:00
Meriipu
347a9df0a1
GDScript: Clarified/fixed inaccuracies in the built-in function docs.
The input to smoothstep is not actually a weight, and the decscription
of smoothstep was pretty hard to understand and easy to misinterpret.

Clarified what it means to be approximately equal.

nearest_po2 does not do what the descriptions says it does. For one,
it returns the same power if the input is a power of 2. Second, it
returns 0 if the input is negative or 0, while the smallest possible
integral power of 2 actually is 1 (2^0 = 1). Due to the implementation
and how it is used in a lot of places, it does not seem wise to change
such a core function however, and I decided it is better to alter the
description of the built-in.

Added a few examples/clarifications/edge-cases.

(cherry picked from commit 7f9bfee0ac)
2021-02-11 13:12:06 +01:00
PouleyKetchoupp
5e978d1df5
Fix contact points debug for 3D Physics
Setting each point's position was missing for 3D. Now enabling collision
render debug will display contact points for 3D physics, the same way it
does for 2D physics.

Note: Multimesh rendering seems not to work in this scenario on master,
but it's working fine on 3.2.

(cherry picked from commit e5e9be8355)
2021-02-11 13:12:06 +01:00
Michael Alexsander
e6b3579e56
Make FileSystem dock set its path to the base folder of files after changes
(cherry picked from commit cf9d5cec22)
2021-02-11 13:12:06 +01:00
kleonc
e900ca1f76
Make String::ends_with don't use String::rfind
(cherry picked from commit ad0943e3d3)
2021-02-11 13:12:06 +01:00
Rémi Verschelde
fb0d0ad018
Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@lyuma, @nathanfranke, @pycbouh

(cherry picked from commit 1c58514c18)
2021-02-11 13:12:03 +01:00
Rémi Verschelde
f55c23d8f2
Merge pull request #44476 from Calinou/doc-object-new-bug
Document known bug with `Object.new()` and workaround
2021-02-11 12:26:25 +01:00
Rémi Verschelde
b2f925ea42
Merge pull request #45889 from Faless/js/3.x_xhr_fix
[3.2] [HTML5] Fix HTTPClient request_raw.
2021-02-11 11:08:14 +01:00
Rémi Verschelde
6f26df58a8
Merge pull request #45884 from Faless/js/3.x_more_handlers
[3.2] [HTML5] Handle contextmenu, webglcontextlost internally.
2021-02-11 10:53:41 +01:00
Fabio Alessandrelli
4086a123b9 [HTML5] Fix HTTPClient request_raw.
Now send data according to the spec, properly handle null data.
Simplify JS code since we are at it.
2021-02-11 09:32:17 +01:00
Fabio Alessandrelli
8c9a503bde [HTML5] Handle contextmenu, webglcontextlost internally.
This way they are automatically cleaned up when the engine exits,
landing a hand to browsers garbage collectors.
2021-02-11 08:00:53 +01:00
Rémi Verschelde
5d2a9c96d4
Merge pull request #45880 from KoBeWi/retro_stalking
[3.2] Detect external modification of scenes
2021-02-11 02:21:34 +01:00
kobewi
e7ee561ca0 Detect external modification of scenes 2021-02-11 01:08:49 +01:00
Rémi Verschelde
3fed3ea7a5
Merge pull request #45878 from fmazan/3.2-autocompletion-box-fix
[3.2] Fixed completion box not showing properly
2021-02-10 20:58:04 +01:00
Filip
9c4f16f4c1 Fixed completion box not showing properly [3.2] 2021-02-10 20:40:00 +01:00
Rémi Verschelde
5e7df2da08
Merge pull request #45876 from Calinou/doc-particles2d-no-atlas
Document Particles2D not supporting AtlasTexture region
2021-02-10 19:47:42 +01:00
Hugo Locurcio
97b43e816b Document Particles2D not supporting AtlasTexture region
See #13923.
2021-02-10 18:09:51 +01:00
Rémi Verschelde
5bec2cf3d4
Merge pull request #45772 from CherokeeLanguage/3.2
[3.2] Fix issue with NVIDIA and axis mapping for joysticks.
2021-02-10 17:04:05 +01:00
Rémi Verschelde
5cf55fe905
Merge pull request #45065 from aaronfranke/3.2-basis-eq-inst
[3.2] Use instance and first arg in Basis is_equal_approx
2021-02-09 20:22:31 +01:00
Gordon MacPherson
f175b70890
Merge pull request #45851 from RevoluPowered/fix-broken-fbx-vertex-duplication
[fbx; high priority] fixed bug in vertex duplication breaking meshes
2021-02-09 17:48:37 +00:00
Gordon MacPherson
53aee600d3 fixed bug in vertex duplication breaking meshes 2021-02-09 16:33:46 +00:00
Michael Conrad
8777282c40 Fix joystick axis mapping issues with NVIDIA shield. Probably others.
Issues addressed:

a) Axis mappings were including virtual mouse axes on NVIDIA Shield TV.

The virtual mouse axes have the same axis numbers as the normal analog stick numbers. This was completely breaking joypad support on NVIDIA Shield TV.

b) Joypads were being tracked in a List with the index in the list being treated as the Godot device id.

If a device were to be removed, any device later in the list would be shifted, potentially causing future events with the shifted joypads to have incorrect IDs according to the Godot engine.

c) Unnecessary events were being sent to the Godot engine.

A check was added (per Joystick) that will prevent sending events for all axes when only a single axis value changed.
A similar check was added for "HATs".

See #45712
2021-02-09 08:33:42 -05:00
Rémi Verschelde
85f92a2463
Merge pull request #45843 from lawnjelly/ewok_backbuffer_sort_fix
Batching - prevent reordering items over a copybackbuffer
2021-02-09 14:13:58 +01:00
Aaron Franke
f201382a85
[3.2] Use instance and first arg in Basis is_equal_approx
Discards the second argument.
2021-02-09 05:09:51 -05:00
Rémi Verschelde
398a625a9f
Merge pull request #39421 from RandomShaper/pause_aware_picking_3.2
Implement pause-aware picking (3.2)
2021-02-09 10:43:48 +01:00