Skip to content

Add Distance/Skybox blocks and fix jump precision#176

Open
brettfxio wants to merge 1 commit into
mainfrom
enhancement/new-blocks-and-jump-fix-2718755351492916509
Open

Add Distance/Skybox blocks and fix jump precision#176
brettfxio wants to merge 1 commit into
mainfrom
enhancement/new-blocks-and-jump-fix-2718755351492916509

Conversation

@brettfxio

Copy link
Copy Markdown
Contributor

This PR introduces two new features and one bug fix to the 3D engine:

  1. Get Distance Block: Users can now calculate the distance between two objects in the scene. This is useful for proximity-based logic (e.g., triggering an event when a player is close to an NPC).
  2. Set Skybox URL Block: Provides a way to set custom environmental backgrounds using URL-based cube maps, enhancing the visual variety of projects.
  3. Jump Precision Fix: Corrected the playerJump detection logic. Previously, the detection ray was too long, allowing players to jump while floating in the air. The raycast offset was reduced to 0.1 for tighter, more accurate ground detection.

Automated tests were added in tests/jump.spec.js to ensure the jump logic remains precise. Frontend verification was performed to confirm the new blocks are correctly integrated into the Blockly toolbox.


PR created automatically by Jules for task 2718755351492916509 started by @brettfxio

- Implemented `get_distance_between` block to calculate distance between two meshes.
- Implemented `set_skybox_url` block to allow custom environment backgrounds via URL.
- Fixed a bug in `playerJump` where the ground detection ray was too long (reduced offset from 0.8 to 0.1).
- Added `tests/jump.spec.js` to verify jump logic and prevent regressions.
- Updated `BabylonSceneManager` with `getDistance` and `setSkyboxUrl` methods.
- Added JavaScript generators for the new blocks.

Co-authored-by: brettfxio <105930054+brettfxio@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