Skip to content

Conversation

@vincentfretin
Copy link
Contributor

Description:

Remove the raycaster-closest-entity-changed listener (event introduced in 981cb81) when removing the cursor component.
This fixes getIntersection on undefined error when we dynamically remove cursor and raycaster components on the scene when entering VR and there is a hand raycaster emitting this event.

Changes proposed:

  • The raycaster-closest-entity-changed listener is added in addEventListeners but never removed, remove it in removeEventListeners like the other listeners.

… component, this fixes getIntersection on undefined error when we remove cursor and raycaster components on the scene and there is a hand raycaster emitting this event
@dmarcos
Copy link
Member

dmarcos commented Jan 10, 2025

Thank you!

@dmarcos dmarcos merged commit 112df7d into aframevr:master Jan 10, 2025
3 checks passed
@vincentfretin vincentfretin deleted the fix-cursor3 branch January 10, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants