In my Three.js project, I am utilizing a THREE.Group to manage selected dominoes within the scene. However, I am facing an issue where the reported position of the THREE.Group remains constant at (0, 0, 0) despite adding or removing objects to it. Additionally, I have implemented a method to calculate the average position of the selected dominoes within the group, but it appears to be calculating incorrectly.
To replicate the issue:
1. Create domino objects in the scene. 2. Select one or more dominoes using the selection tool. 3. Check the reported position of the THREE.Group. 4. Compare the reported position with the actual position of the selected dominoes.
Expected outcome:
The position of the THREE.Group should accurately represent the average position of the selected dominoes within it.
Current behavior:
The reported position of the THREE.Group remains at (0, 0, 0) consistently, and the calculated average position of selected dominoes seems to be incorrect.
GitHub Page : GitHub Code : https://github.com/KA-Hirithik/DominoForgeStackOverFlow