feat: implement tween continuous modes and texture offset - #946
Merged
Conversation
- Change verbose INFO logs to DEBUG for TriggerArea CREATE/DELETE - Fix clippy cloned_ref_to_slice_refs warnings using std::slice::from_ref - Add #[allow(clippy::too_many_arguments)] to build_trigger_result - Apply cargo fmt formatting
pool manager potential leak thread as an error
…ous, TextureMoveContinuous) Add support for continuous tween modes that apply incremental changes each frame: - MoveContinuous: position += direction * speed * delta_time - RotateContinuous: rotation += direction_euler * speed * delta_time - TextureMoveContinuous: UV offset/scale += direction * speed * delta_time - TextureMove: interpolates UV between start and end values Changes: - Add last_update field to Tween struct for delta time calculation - Add TextureAnimation state struct to scene.rs for UV animation - Implement continuous modes that never complete (always TsActive) - Apply UV offset/scale to materials via set_uv1_offset/set_uv1_scale - Clean up tween and texture animation state on entity deletion
…angles Euler angle approach caused gimbal lock and 'vibrating' effects. Axis-angle extraction properly handles continuous rotation by: 1. Extracting axis and angle from direction quaternion 2. Scaling angle by speed * delta_time 3. Creating rotation step quaternion 4. Multiplying with current rotation
The SDK encodes the rotation axis in the quaternion's (x, y, z) components with w=0, rather than as a proper quaternion. Speed is in degrees per second. This fix extracts the axis directly and uses proper axis-angle rotation.
Contributor
📊 Benchmark Report
Click to expand full benchmark reportDecentraland Godot Explorer - Benchmark ReportGenerated: 2025-12-29_18-08-57 Total Tests: 5 📊 Comparison: vs main branch baseline
Table of ContentsSummary OverviewMemory Metrics
Object Counts
Rendering Metrics
Resource Analysis
Detailed Test ResultsTest 1: 1_Terms_and_ConditionsBenchmark Report: 1_Terms_and_ConditionsTimestamp: 2025-12-29_18-06-30 Memory Metrics
Object Counts
Rendering Metrics
Test 2: 2_LobbyBenchmark Report: 2_LobbyTimestamp: 2025-12-29_18-06-37 Memory Metrics
Object Counts
Rendering Metrics
Test 3: 3_MenuBenchmark Report: 3_MenuTimestamp: 2025-12-29_18-06-44 Memory Metrics
Object Counts
Rendering Metrics
Test 4: 4_Explorer_Goerli_PlazaBenchmark Report: 4_Explorer_Goerli_PlazaTimestamp: 2025-12-29_18-07-15 Memory Metrics
Object Counts
Rendering Metrics
Resource Analysis
Test 5: 4_Explorer_Genesis_PlazaBenchmark Report: 4_Explorer_Genesis_PlazaTimestamp: 2025-12-29_18-08-44 Memory Metrics
Object Counts
Rendering Metrics
Resource Analysis
📋 Logs & Artifacts
🔄 Updated: 2025-12-29 18:09:03 UTC |
- Add TriggerDetector collision to avatars for trigger area detection - Track avatar entity IDs via metadata (dcl_entity_id, dcl_scene_id) - Implement scene-awareness: only fire events for entities in active scene - Separate physical state (entities_inside) from logical state (entities_entered) - Generate synthetic ENTER/EXIT events when entities change scenes while physically inside trigger areas - Query avatar current scene via metadata to handle remote avatar scene changes
kuruk-mm
force-pushed
the
feat/trigger-area
branch
from
December 17, 2025 01:15
7a73e4c to
b7812a7
Compare
- Cache avatar scene info in AvatarTriggerInfo struct to avoid per-frame metadata queries - Batch metadata queries across all trigger areas (query each avatar once, not per-area) - Only query metadata when cache indicates potential state change: - If cache says avatar in scene: query to verify they haven't left - If cache says avatar not in scene: query to check if they joined - Skip query entirely when cache matches expected state
kuruk-mm
force-pushed
the
feat/trigger-area
branch
from
December 17, 2025 01:17
b7812a7 to
cdb0f48
Compare
…isable Replace complex state tracking and per-frame polling with simple physics enable/disable based on player scene. When player leaves a parcel scene: - Generate EXIT for all entities inside trigger areas - Disable physics monitoring (area_set_monitor_callback invalid) When player enters a parcel scene: - Re-enable physics monitoring - PhysicsServer3D auto-fires ENTERs for overlapping bodies Removed (~460 lines): - AvatarTriggerInfo struct with last_known_scene cache - entities_entered HashSet (dual state tracking) - sync_entity_states() function (~190 lines of polling) - get_avatar_current_scene() metadata query function - Scene-awareness checks in process_callback_events() - _on_avatar_scene_changed callback in avatar.gd Added (~186 lines): - check_scene_active() function for enable/disable logic - is_active flag on TriggerAreaInstance - last_player_scene_id field on Scene Result: ~26% code reduction, simpler mental model, no per-frame metadata queries, more responsive scene transitions.
Resolve merge conflicts: - Use main's trigger detection approach (single-param setup, remove for NPCs) - Keep both UV offset/tiling and transparency handling in material.rs - Add StuckDetector from main - Keep TextureAnimation struct for tween feature
kuruk-mm
marked this pull request as ready for review
December 23, 2025 19:26
The trigger area cleanup code was accidentally duplicated during merge.
Contributor
📦 Build Report🤖 Android
Build Status: ✅ Success 🍏 iOS
🔗 Workflow Run: View logs 🔄 Updated: 2025-12-29 18:21:23 UTC |
The gdext 4.5 upgrade renamed godot::engine to godot::classes.
leanmendoza
approved these changes
Dec 29, 2025
This was referenced Dec 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the new continuous tween modes from protocol PR #313 and ADR #301:
direction * speed * delta_time) each framedirection_euler * speed * delta_time) each frameKey changes:
last_updatefield toTweenstruct for delta time calculation between framesTextureAnimationstate struct to store per-entity UV offset/scaleTsActivestate forever (never complete)set_uv1_offsetandset_uv1_scaleBehavior table:
MoveContinuousRotateContinuousTextureMoveContinuous(TMT_OFFSET)TextureMoveContinuous(TMT_TILING)TextureMove(standard)Test plan