So i have a bounding box of an object (it can be rotated etc), now i wish to change the bounding box size - to do so i click on the screen near the box side and try to drag it, however i am unable to find proper side, it just feels like its random.
my apporach is that i first store the base of the bounding box (where its center is in 0,0,0), then after click i make a ray form screen to world and determine, closest point on that ray to the object position (center of the bounding box). then i perform polygon ray intersection (from box center towards closest point) this gives me the hit, it doesn't seem to work in my case (btw i take into account all rotations and translations)
here is the screen:
so maybe theres a better way to find the side?