Tresjs / tres

Declarative ThreeJS using Vue Components
https://tresjs.org
MIT License
2.27k stars 107 forks source link

Sprite - Raycast events not firing if inside group #759

Closed dghez closed 4 months ago

dghez commented 4 months ago

On v4 I noticed that if a Sprite is inside a Group, the events coming from the raycast are not triggered, only the missing one, even if the events are binded to the Sprite itself, not the parent group. Red is Sprite+Group, Blue is Sprite

-- ADDITION: I noticed one interesting thing too. In the demo if you swap the order of the sprites, everything is gonna break

      <SpriteNoGroup />
      <SpriteWithGroup />

Try to swap e bring the one with the group first, it throws an error.

https://github.com/Tresjs/tres/assets/6367879/cbbe512b-c2f9-4734-be8f-5c985f627555

Reproduction

https://stackblitz.com/edit/nuxt-starter-yxv5gz?file=components%2FSpriteWithGroup.vue

Steps to reproduce

No response

System Info

No response

Used Package Manager

npm

Code of Conduct

garrlker commented 4 months ago

This issue was fixed by this PR

When the next version of Tres releases, you should no longer hit this issue

alvarosabu commented 4 months ago

Released https://github.com/Tresjs/tres/releases/tag/4.1.0

dghez commented 4 months ago

@garrlker / @alvarosabu

Update from my side: i've updated locally on my project to 4.1.0 and is working perfectly on dev mode. Although when I run the build/prod using nuxt in production the events are not working anymore. Weird.

Even that, I've updated the stackblitz link here above and weirdly is not working neither in dev mode

alvarosabu commented 4 months ago

@dghez hi there. If you are using nuxt with the nuxt module you need to wait for the release there

dghez commented 4 months ago

@alvarosabu I've updated to 3.0.1 of the nuxt module and somehow it started to work :) So far, for what I see, we can consider it solved :)