Hello, I’ve been scratching my head for weeks trying to figure this out.
I’ve created this codepen based on the Three.js OBB example: https://codepen.io/accrobat/pen/rNOKNyg?editors=0010
- random green elements, fixed.
- blue element that moves with the mouse
- working collision detection based on OBBs between the blue and green elements
- ideally, it should work even if the blue element itself rotates
How do I code the response to the collision? i.e. the blue element should not penetrate the green elements and should be blocked by them. The green elements are fixed so there is no need for a reaction from them or any complex physics.
Anyone can help with an updated codepen?