Skip to content

Conversation

ryantrem
Copy link
Member

This PR adds a picking button to the toolbar for picking objects from the scene.

image

The picking logic is similar to inspector v1, but fixes a handful of bugs as well.

  • Picking gizmos doesn't work in v1, at least not in any way I expect it to as a user or looking at the existing code. It works in v2.
  • Picking meshes with morph target or skeletal animations does not work in v1. It works in v2.

The picking logic also uses the "Ignore Backfaces for Picking" setting that @deltakosh already added to the settings pane.

image

Other changes:

  • Fixed a bug that was introduced 5 years ago where the isHovered state on a gizmo is only updated on pointer click, not on pointer move, which means if you click on it, it just stays in the "hovered" state indefinitely.

@ryantrem ryantrem enabled auto-merge (squash) August 22, 2025 23:55
@bjsplat
Copy link
Collaborator

bjsplat commented Aug 22, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 23, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 23, 2025

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17058/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17058/merge/?snapshot=refs/pull/17058/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 23, 2025

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17058/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 23, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 23, 2025

@ryantrem ryantrem merged commit 1250d46 into BabylonJS:master Aug 25, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants