Skip to content

Conversation

@goyalpalak18
Copy link
Contributor

Description

I'm fixing a visual bug where the selection outlines (the rainbow highlights) would detach and float in empty space if a user scaled the physics objects.

Previously, when you selected an object like a Jet, we created a static copy of its position and added the outline to the main scene. If you then used the "Jets Scale" slider to resize or move those jets, the outline stayed frozen in the old spot. This made the visualization look broken and confusing.


The Fix

I updated the EffectsManager to use the Three.js scene graph more effectively.

Instead of adding the outline helper to the root scene, I am now adding it as a child of the selected mesh itself. This means the outline automatically inherits all transformations—if the parent jet moves or scales, the outline follows it perfectly without us needing to manually sync them in the render loop.


How to Test

  1. Load the ATLAS demo in the Phoenix app.
  2. Enable "Selecting" in the Settings menu.
  3. Click on a Jet to select it.
  4. Go to the Phoenix Menu > Event Data > Jets.
  5. Move the "Jets Scale" slider (e.g., to 2.0).

Expected Result: The rainbow outline should expand and move exactly along with the Jet geometry, rather than getting left behind.

Signed-off-by: goyalpalak18 <goyalpalak1806@gmail.com>
@goyalpalak18
Copy link
Contributor Author

Hi @EdwardMoyse @9inpachi,

This PR fixes the issue where selection outlines drift away from objects when scaling (like with the Jets slider). I've updated the EffectsManager to parent the outline directly to the mesh, so it inherits transforms automatically.

Ready for review when you have a moment!

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