Closed Jamzy01 closed 1 year ago
Thanks for reporting! This branch should fix those issues: https://github.com/jonobr1/two.js/tree/issue-697-bounding-box
I still need to do some additional performance testing before merging into the main branch however.
This example uses the aforementioned branch: https://codepen.io/jonobr1/pen/YzJGNOq
Thanks, this should work perfectly.
How to check if an object is currently being hovered by the mouse whilst taking rotation into account?
I have tried the Two.Path.getBoundingClientRect api, which works flawlessly for rectangular unrotated objects, although for rotated objects as this only returns an unrotated rect it does not work perfectly. Is there an api that will be able to check if any point is within a Two.path (including convex and concave shapes) that also takes rotation into account, or how easy would this be to implement myself?
Environment (please select one):
If applicable:
Desktop (please complete the following information):