Commit Graph

1355 Commits

Author SHA1 Message Date
lawnjelly 3e19cf834a CPUParticles2D - Add ability to follow physics interpolated target
Allows a non-interpolated particle system to closely follow an interpolated target without tracking ahead of the target, by performing fixed timestep interpolation on the particle system global transform, and using this for emission.
2023-09-18 16:05:03 +01:00
lawnjelly bc1426dd70 CPUParticles2D - non-interpolated global mode use global space
Changes the implementation of non-interpolated global mode particles so that the vertices are specified in proper global space instead of local space (vertices were previously back transformed by the inverse of the parent transform).
2023-09-18 16:05:03 +01:00
Rémi Verschelde 1b4bae595e
Merge pull request #80955 from lawnjelly/fti2d_more_resets
[3.x] Physics Interpolation - automatic resets for Camera2D and TileMap
2023-09-18 17:00:05 +02:00
Rémi Verschelde cc48c1825f
Merge pull request #80887 from lawnjelly/cpuparticles2d_fix_double_xform
[3.x] CPUParticles2D - fix interpolated transforms and culling
2023-09-18 17:00:00 +02:00
Rémi Verschelde 9eb4d5d5de
Merge pull request #80827 from lawnjelly/fix_cpu_particles_notif_transform
[3.x] CPUParticles - fix non-interpolated `NOTIFICATION_TRANSFORM`
2023-09-18 16:59:57 +02:00
Haoyu Qiu aea0c1235d Fix TouchScreenButton not redrawn when texture changes
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-08-29 18:08:28 +08:00
Haoyu Qiu d6221bd614
Notify child controls when BackBufferCopy's rect changed
(cherry picked from commit 602a0d2fbc)
2023-08-28 17:27:13 +02:00
lawnjelly 09b79ead80 Physics Interpolation - automatic resets for Camera2D and TileMap.
Extra reset required for Camera2D. TileMaps require resetting by quadrant.
2023-08-24 10:18:12 +01:00
lawnjelly 65f72c8c02 CPUParticles - fix non-interpolated NOTIFICATION_TRANSFORM
Updates global particle transforms immediately on receiving notification, to match legacy behaviour.
2023-08-22 18:35:00 +01:00
lawnjelly 723632a76a CPUParticles2D - fix interpolated transforms and culling
1) Physics interpolated particles in global mode are specified in global space. In VisualServer they should therefore ignore local transform.

2) Additionally, the expected final_transform should be passed on to children, rather than the identity transform used on the local item.

3) Local bounds in hierarchical culling are fixed for items using identity transform, by calculating their local bound in local space from the global space particles.
2023-08-22 12:57:54 +01:00
Rémi Verschelde 21ab700f2d
Merge pull request #80406 from lawnjelly/animated_sprite_normal_fix
[3.x] Fix AnimatedSprite normal map loading
2023-08-15 09:04:35 +02:00
Rémi Verschelde 95877b8e1f
Merge pull request #80289 from lawnjelly/fti_2d_reset_on_enter
[3.x] Physics Interpolation 2D - reset on NOTIFICATION_ENTER_TREE
2023-08-08 14:28:23 +02:00
lawnjelly d02b319ec4 Fix AnimatedSprite normal map loading
Normal map names are now correctly set up during loading.
2023-08-08 09:42:55 +01:00
lawnjelly bcfca5ec86 Physics Interpolation 2D - reset on NOTIFICATION_ENTER_TREE
As a convenience, physics interpolation is reset automatically on entering the tree. This will be desired in most situations, and saves the user having to write code for this explicitly.
2023-08-05 08:33:19 +01:00
lawnjelly a117a3307a Physics Interpolation - add support for CPUParticles2D
Similar to the existing 3D CPUParticles physics interpolation.
2023-08-03 14:44:08 +01:00
lawnjelly 5162efbfe9 2D Fixed Timestep Interpolation
Adds support to canvas items and Camera2D.
2023-08-01 16:07:48 +01:00
Rémi Verschelde 29eeb461f2
Merge pull request #68738 from lawnjelly/faster_canvas_item
[3.x] Canvas item hierarchical culling
2023-06-27 08:40:22 +02:00
Rémi Verschelde eaca9a17c3
Revert "Add option in VisibilityEnabler2D to hide the parent for better performance" 2023-06-13 14:25:19 +02:00
lawnjelly 43b6205887 Multirect - Fix refining regions for all derived Textures
Fixes allowing all derived texture types to modify region prior to rendering.
2023-05-08 14:48:46 +01:00
kleonc 12c923cb8b Fix rendering tiles using nested AtlasTextures 2023-05-03 18:29:28 +02:00
lawnjelly b777a9e5f9 Canvas item hierarchical culling
Adds optional hierarchical culling to the 2D rendering (within VisualServer).

Each canvas item maintains a bound in local space of the item itself and all child / grandchild items. This allows branches to be culled at once when they don't intersect a viewport.
2023-04-25 20:17:33 +01:00
Rémi Verschelde bfb6877b3c
Merge pull request #75612 from lawnjelly/fix_skele2d_bounds2
[3.x] Fix Polygon2D skinned bounds (for culling)
2023-04-25 16:24:59 +02:00
Rémi Verschelde 31224276ee
Merge pull request #63193 from BimDav/visibility_enabler2
Add option in VisibilityEnabler2D to hide the parent for better performance
2023-04-25 16:24:54 +02:00
Rémi Verschelde 4c5a934408
Merge pull request #68960 from lawnjelly/multirect
Batching - Add MultiRect command
2023-04-17 17:25:20 +02:00
lawnjelly dd6c213dac Fix Polygon2D skinned bounds (for culling)
The bound Rect2 was previously incorrect because bone transforms need to be applied to verts in bone space, rather than local space. This was previously resulting in skinned Polygon2Ds being incorrectly culled.
2023-04-12 10:17:02 +01:00
Rémi Verschelde 564622af51
Merge pull request #69645 from radenling/backport-fix-viewport-update-in-editor
[3.x] Fix for 2D viewport not updating in the editor when the camera moves
2023-04-11 10:53:20 +02:00
Richard Adenling 3cfbabfa59 Fix for 2D viewport not updating in the editor when the camera moves
This fixes a problem with 2D viewports not taking the camera position
into consideration when previewed in the editor.

Fixes #40441
2023-03-26 20:49:59 +02:00
lawnjelly 910ddd13c4 Batching - Add MultiRect command
Large groups of similar rects can be processed more efficiently using the MultiRect command. Processing common to the group can be done as a one off, instead of per rect.

Adds the new API to VisualServerCanvas, and uses the new functionality from Font, BitmapFont, DynamicFont and TileMap, via the VisualServerCanvasHelper class.
2023-03-10 10:58:04 +00:00
smix8 c7a92f68a1 Add error messages for collision exception functions
Adds error messages to collision exception functions when used with the wrong object/node instead of failing silently.
2023-02-24 00:36:30 +01:00
Rémi Verschelde 89788cdcc2
Merge pull request #70514 from stmSi/fix-editor-hanging-audio-pitch-scale-nan
[3.x] Fix hanging if audiostream's pitch_scale is NaN
2023-02-17 12:15:27 +01:00
Brian Semrau 70316aab91 Fix Line2D UVs when using BOX end cap mode 2023-02-10 20:45:31 -05:00
smix8 b5213cceac Fix navigation related nodes not propagating parent class config warnings
Fixes that navigation related nodes do not propagate config warnings from their parent classes.
2023-01-30 16:26:42 +01:00
Rémi Verschelde abf5f72073
Merge pull request #70717 from Calinou/particles-tweak-animation-offset-property-hint-3.x
Tweak particles animation offset property hint to allow more precise values (3.x)
2023-01-11 11:57:38 +01:00
Rémi Verschelde 1426cd3b3a
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".

Backported from #70885.
2023-01-10 15:26:54 +01:00
Hugo Locurcio 717cbbd6e7
Tweak particles animation offset property hint to allow more precise values 2022-12-29 22:17:47 +01:00
stmSi 28e1fc4af9 Fix Editor hanging if audiostream's pitch_scale is NaN 2022-12-24 12:34:22 +06:30
Rémi Verschelde 3b7bb812fd
Merge pull request #70310 from Sauermann/3x-fix-follow-viewport-transform
[3.x] Include the follow-viewport-transform into CanvasLayer transform calculations
2022-12-22 08:55:28 +01:00
Markus Sauermann 608cbd8296 Include the follow-viewport-transform into CanvasLayer transform calculations
The follow-viewport-transform was missing from several calculations

3.x version of #59682
2022-12-19 19:18:54 +01:00
smix8 17e6d76de6 Fix Navigation agent callback wild pointer crash
Fixes crash in sanitizer builds when callback agent or object are already freed.

(cherry picked from commit 194c1c44e0)
2022-12-18 10:32:04 +08:00
FireForge 0d602ce881 Add Vector2/3 linking to more properties
- Camera2D.zoom
- CanvasLayer.scale
- ParallaxBackground.scroll_base_scale
- ParallaxLayer.motion_scale
- Polygon2D.texture_scale
- SpatialMaterial.uv1_scale
- SpatialMaterial.uv2_scale

(cherry picked from commit 92817aa72f)
2022-12-18 10:32:04 +08:00
kobewi 9499ebecee Add vector value linking
Co-authored-by: redlamp <244062+redlamp@users.noreply.github.com>
(cherry picked from commit 5553e27fe8)
2022-12-18 10:32:04 +08:00
Wilson E. Alvarez 78b8cf7edb
Avoid compiling Editor checks in release builds for VisibilityNotifier2D 2022-12-15 11:13:10 -05:00
Rémi Verschelde 2c714f19e5
Merge pull request #65453 from timothyqiu/agent-target-3.x
[3.x] Make NavigationAgent `target_location` a property
2022-12-12 16:07:25 +01:00
smix8 16bb34d23d Add detail to NavigationPolygon outline error msg
Adds additional information to the error msg when the convex partition fails due to invalid outline arrays.

(cherry picked from commit f30ebacbe8)
2022-12-12 14:19:46 +08:00
Hugo Locurcio 5115db63aa
Fix BackBufferCopy `rect` property appearing when not relevant in inspector
The `rect` property is only effective if `copy_mode` is Rect.
2022-12-08 20:04:56 +01:00
kobewi 2f13adbdb6 Remove error condition from get_global_transform()
(cherry picked from commit 2ff676a696)
2022-12-01 11:47:52 +08:00
Hugo Locurcio 4c26cac0e6
Improve collision exception error messages for easier understanding 2022-11-19 17:37:42 +01:00
kleonc 3e373c4eec Add `ShapeCast2D/3D::get_collider_rid` method 2022-11-02 15:20:13 +01:00
Haoyu Qiu 78981d2e0a Make NavigationAgent `target_location` a property 2022-10-31 20:46:38 +08:00
Sam Briels 3e186ae043 fix: emit target_reached signal after updating state 2022-10-31 13:04:20 +01:00