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

Pinned objects can still be grabbed (newLoader) #6086

Closed
stalgiag opened this issue May 17, 2023 · 4 comments · Fixed by #6092
Closed

Pinned objects can still be grabbed (newLoader) #6086

stalgiag opened this issue May 17, 2023 · 4 comments · Fixed by #6092

Comments

@stalgiag
Copy link
Contributor

Description
Pinned objects can be grabbed and moved when working behind newLoader. A cursory search suggests that the Pinned component is not always successfully added to the entity (either on first pinning or on load from reticulum) causing checks like this one to behave unpredictably.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a room with newLoader URL param
  2. Add an object to the room
  3. Pin the object
  4. Try to move the pinned object

pinned object

@stalgiag stalgiag added bug needs triage For bugs that have not yet been assigned a fix priority and removed needs triage For bugs that have not yet been assigned a fix priority labels May 17, 2023
@stalgiag
Copy link
Contributor Author

stalgiag commented May 18, 2023

The only place where a Pinned component is added to an entity is in the Aframe "pinnable" component. It appears that this system is now disconnected from the rest of the new ECS code. There is no pinnable jsx entity attribute.

Instead of looking for a Pinned component, the objectMenuSystem decides whether to display the "pin" or "unpin" button based on the isPinned() check instead. We can get the expected interaction behavior by replacing hasComponent(world, Pinned, eid) checks in interaction systems with isPinned().

I am still working to wrap my head around which parts of the codebase are currently active on the newLoader path but my intuition is that checking if the server is the creator of an entity to determine state is not an ideal solution as it deviates from the ecs pattern.

@stalgiag
Copy link
Contributor Author

stalgiag commented May 18, 2023

This relates to task with promotion permissions on ECS path. To handle both issues, I am going to make a pinnable system.

@Exairnous
Copy link
Contributor

Looks like this bug now affects the current loader.

@Exairnous
Copy link
Contributor

@johnshaughnessy ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants