Skip to content

Optimize WorldRotator and TerraceSpiral#82

Draft
icarito wants to merge 1 commit into
mainfrom
fd-036-world-rotator-optimization-18342589918340756946
Draft

Optimize WorldRotator and TerraceSpiral#82
icarito wants to merge 1 commit into
mainfrom
fd-036-world-rotator-optimization-18342589918340756946

Conversation

@icarito
Copy link
Copy Markdown
Owner

@icarito icarito commented May 20, 2026

Optimized the world rotation system (FD-036) for better performance and natural gamefeel. Key changes include spatial search for collision plate assignment, transform caching in TerraceSpiral, frame-by-frame collision pool synchronization, and improved airborne rotation logic with smoothstep easing.


PR created automatically by Jules for task 18342589918340756946 started by @icarito

Implemented several performance and aesthetic improvements to the FD-036 world rotation system:

1. Optimized TerraceSpiral.gd:
   - Added dirty-flag tracking to skip redundant MultiMesh updates.
   - Implemented transform caching in _cached_transforms for O(1) access by WorldRotator.

2. Optimized WorldRotator.gd Search:
   - Refactored _assign_pool_to_nearest_plates to use a spatial range search based on height (Y-local), reducing complexity from O(N*M) to O(N*Range).
   - Integrated transform cache from TerraceSpiral.

3. Improved Physical Consistency:
   - Added _sync_pool_transforms_to_world to update collision pool transforms every frame when continuous_tracking is active, preventing visual-physical drift during world rotation.

4. Enhanced Gamefeel:
   - Implemented rotation while airborne with a 0.3x dampening factor to prevent static landings while avoiding disorientation.
   - Applied smoothstep easing to rotation interpolation for more organic movement.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant