Hey guys, I am having issues with my raycasting intersecting with the correct object when I move the object up by 5 units on the y-axis. It seems like the bounding box is left behind and the box moves.
When I hover over the object, it is supposed to highlight the object red. Otherwise, it reverts back to its original color.
Gif 1: Shows how the bounding box and boxes are not synchronized.
https://gyazo.com/159021279e237b386281e0e6abd41a57
I thought this was due to the bounding boxes not calculating correctly, so I traversed through each child every render and made sure to calculate the bounding box/sphere – still did not fix the problem.
Here is my code: (please forgive the spaghatti, this is all for practice and it's been a messy because of this raycast failing... I started learning Three.js last week.)