Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a visual marker for the selected entity #9

Open
idanarye opened this issue Jun 7, 2022 · 1 comment
Open

Add a visual marker for the selected entity #9

idanarye opened this issue Jun 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@idanarye
Copy link
Owner

idanarye commented Jun 7, 2022

Would also be nice to mark hovered entities, to make it easier to tell what will be selected.

@idanarye idanarye added the enhancement New feature or request label Jun 7, 2022
@idanarye
Copy link
Owner Author

idanarye commented Jun 7, 2022

Since all kind of things can be selected, I don't want to use sprite/mesh/material manipulation. I can think of 3 things that would be universal(ish):

  1. Visibility - blink the selected entity.
  2. Transform - do a pulse and/or shake animation.
  3. Marker entity with graphics, that'll point at the selected entity.

Option 1 would be the easiest, but would probably look terrible. Option 3 would be hard to pull off, because I'll need to determine the size of the object on the screen. Also, it'll be harder

The option I like the most is option 2. I think, instead of using an animation plugin, I'll plant my own animation in CoreStage::PostUpdate after TransformSystem::TransformPropagate. There I'll change the GlobalTransform (not the Transofrm!) of the selected entity and its children.

Or even better - change the Transform before TransformPropagate but remember its value, and restore that value after it. That way GlobalTransform will just work normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant