Commit Graph

129 Commits

Author SHA1 Message Date
e56cf87f3c Fix is_visible_in_tree regression for out of tree 2025-08-28 18:08:00 +01:00
e13227419f FTI - Add reset of setting toplevel 2025-06-29 18:23:01 +01:00
8c6198a58f Revert "FTI - Reduce VisualInstance xform notifications"
This reverts commit 5ec4fd38fa.
2025-06-24 20:16:52 +01:00
84f761ba54 Merge pull request #107493 from lawnjelly/remove_vi_visible
[3.x] Remove `vi_visible` flag from `Spatial`.
2025-06-22 13:11:54 +01:00
ae786bd43a Provide quick access to Object ancestry 2025-06-19 11:04:50 +01:00
8e48d57f4b Spatial and CanvasItem children change to LocalVector 2025-06-18 13:22:20 +01:00
e430053b16 Remove _is_vi_visible()
Can be replaced by `is_visible_in_tree()`.
2025-06-16 17:55:49 +01:00
c416aced1a Merge pull request #105681 from lawnjelly/fti_reduce_xform_notifications
[3.x] FTI - Reduce `VisualInstance` xform notifications
2025-06-13 05:21:52 +01:00
67265bacd5 Merge pull request #107324 from lawnjelly/is_vis_in_tree
[3.x] Pre-calculate `is_visible_in_tree()`
2025-06-12 15:23:59 +01:00
54e5949ffb Pre-calculate is_visible_in_tree() 2025-06-12 10:58:41 +01:00
7b362bba82 FTI - global_transform_interpolated() on demand for invisible nodes 2025-06-08 17:47:23 +01:00
cc61ab2fd5 SceneTreeFTI - fix identity_xform flag getting out of sync
This could cause incorrect rendered xform for one frame.
2025-06-02 11:41:21 +01:00
5ec4fd38fa FTI - Reduce VisualInstance xform notifications 2025-05-30 07:15:17 +01:00
65eb3a2e31 FTI - Optimize SceneTree traversal 2025-05-24 18:26:25 +01:00
a2a8bef10f FTI - Fix 3D auto-resets
* Ensure NOTIFICATION_RESET_PHYSICS_INTERPOLATION is sent to derived classes
* Add deferred auto-resets for all `Spatials` on entering the tree
2025-04-16 19:43:13 +01:00
2bb32734cf Physics Interpolation - Fix non-interpolated resting xforms
Ensure servers are updated for non-interpolated Spatials, either during the scene tree update or a final pass.
Ensure properties and xforms are given a final server update in the final resting positions after removal from tick lists.
Fixes dirty local xform bug.
2025-04-09 07:41:00 +01:00
18c01b21e5 Physics Interpolation - Add InterpolatedProperty
And add some basic interpolated properties to Camera.
2025-04-07 08:19:00 +01:00
66a2efe491 Physics Interpolation - Move 3D FTI to SceneTree
Moves 3D interpolation from `VisualServer` to the client code (`SceneTree`).
Complete rework of 3D physics interpolation, but using the same user API.
2025-03-17 17:55:26 +00:00
d80b206643 Physics Interpolation - refactor client interpolation pump
* Move client interpolation pump to earlier in the iteration before 3D physics synced
* Allow `get_global_transform_interpolated()` to prime the client interpolation inside a physics tick
2024-06-19 08:44:33 +01:00
0b30d77384 Physics Interpolation - refactor Camera and fix get_camera_transform()
* Moves 3D Camera interpolation scene side.
* Automatically switches `get_camera_transform()` to report interpolated transform during `_process()`.
* Fixes `ClippedCamera` to work with physics interpolation.
2024-06-09 12:08:27 +01:00
1b5fa74e39 Discrete Level of Detail
Add scene side discrete level of detail.

New node `LOD` for UI, and `LODManager` within `World` for automatically updating child visibilities based on distance from cameras.
2024-02-10 18:54:25 +00:00
8b79135538 Add MergeGroup node to simplify merging Meshes at runtime 2024-01-31 08:28:51 +00:00
ab9ed3245d [3.x] Add "position" as an alias for "translation" in Spatial 2023-12-05 17:25:48 -06:00
7958ceaab8 Fix overwriting of Spatial's local transform
Modifies when 'DIRTY_LOCAL' flag is set to prevent a transform applied
using `set_transform` to be overwritten by previous calls to change the
node's rotation, translation or scale.

Fixes #43130.
2023-06-19 16:18:51 +02:00
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
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
5238740fef Add global_translation and global_rotation to Spatial 2022-07-15 21:39:35 -06:00
688dc534e5 Fix get_global_transform_interpolated() with multiple ticks per frame
The previous and current transforms in the interpolation data were not being correctly updated in cases where two or more physics ticks occurred on a frame. This PR introduces a simple mechanism to ensure updates on interpolated spatials.
2022-02-25 11:22:00 +00:00
522bce1159 Fixed Timestep Interpolation (3D)
Adds fixed timestep interpolation to the visual server.
Switchable on and off with project setting.

This version does not add new API for set_transform etc, when nodes have the interpolated flag set they will always use interpolation.
2022-02-16 09:41:23 +00:00
78f230885b Merge pull request #57475 from snailrhymer/look-at-update 2022-02-02 23:07:20 +01:00
8ea20f5fdd Add OccluderShapePolygon
Add OccluderShapePolygon, glue to Occluder and gizmos etc.
2022-02-01 11:31:06 +00:00
83298da9b8 Backport improved look_at docs and errors
Take extra constraint info and function description from Node3D.look_at to improve Spatial.look_at docs.
Add an explicit error for up == 0
2022-01-31 11:52:15 +00:00
a627cdafc5 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
1b65550ec7 clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
eb6f98ec55 Portal occlusion culling
Adds support for occlusion culling via rooms and portals.
2021-07-14 11:43:23 +01:00
140350d767 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
a828398655 Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
b5e1e05ef2 Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
cb8134f371 Optimize transform propagation for hidden objects
When visual instances are hidden, there is no need to update their global transforms and send these to the visual server. This only needs to be done when the objects are reshown.
2021-02-03 15:16:47 +00:00
49646383f1 Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
188609e5ab CI: Update to clang-format 11 and apply ternary operator changes
(cherry picked from commit af878716f2)
2021-01-13 16:14:35 +01:00
4028414e0e Revert "Made toplevel a property for Node3D and CanvasItem"
This reverts commit a726d011d5.
2020-10-19 16:58:56 +02:00
a726d011d5 Made toplevel a property for Node3D and CanvasItem
(cherry picked from commit 85a8dbb7b6)
2020-10-01 16:00:47 +02:00
df3fad11fd Fixes crash in Spatial::notification 2020-01-25 13:16:51 +08:00
a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
b44e0d60c7 Update transform property in the inspector when changing translation/rotation/scale 2019-11-30 17:16:19 +01:00
58e5c650d7 fix #32711 : Spatial::look_at wrong re-scaling 2019-10-11 02:22:02 -03:00
af5e0fff66 Remove ERR_EXPLAIN from scene/* code 2019-08-09 13:54:52 +02:00
7d8d337b2c fix some crashes 2019-07-01 14:28:29 +03:00