casual-simulation / casualos

Casual Open Simulation for the Web
https://ab1.bot
MIT License
48 stars 8 forks source link

@onGridClick, @onGridUp, and @onGridDown only get called for the primary simulation #425

Closed KallynGowdy closed 4 months ago

KallynGowdy commented 4 months ago

Currently, @onGridClick, @onGridUp, and @onGridDown only get called for the primary simulation. That is, the first simulation that has been loaded into the player. Ideally, because they are shouts, @onGridClick, @onGridUp, and @onGridDown would get called for all simulations that are loaded.

The implementation is a little tricky though, because it should only be called when the simulation is loaded into the viewport that is being clicked. Additionally, when using a controller, it should only be called for the simulations that are being displayed in VR.

See https://www.loom.com/share/bc5186c8921c4438b321bb8392d76e63?sid=7affa03c-e7f1-49f5-a4c7-56d908a77019 for a little more info.