Tresjs / tres

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

Sprite - Raycast events not firing if inside group #759

Closed dghez closed 5 days ago

dghez commented 6 days 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 6 days ago

This issue was fixed by this PR

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

alvarosabu commented 5 days ago

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

dghez commented 2 days 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 2 days ago

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

dghez commented 1 day 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 :)