musehq / spacesvr

A standardized reality for the future of the 3D Web.
https://spacesvr.io
MIT License
182 stars 35 forks source link

collidable component doesnt load automatically #165

Open benjaminha14 opened 1 year ago

benjaminha14 commented 1 year ago

Collidable component isn't loading automatically, looks like you need to hard refresh it to get collisions loaded.

alex-shortt commented 1 year ago

I think what's going on is that Collidable will check its children for meshes on the first render, but if the meshes of its children are suspensed, it will see no meshes. When the suspense resolves, the children prop is still technically the same, so it doesn't run again.

thedocscripts commented 1 year ago

i did a workaround for this using the onupdate void in model and a usestate to enable collisions once it loads. This isnt the best solution for thisbut its a "workaround"