Hi,
I’m currently working on a build mode which features a drag-rotate feature, basically click and hold to make the item look at your mouse, rounding to whatever increment.
Problem is that if you’re placing a lot of items quickly, or even move your mouse a single pixel, the item will snap to your mouse, meaning you will probably encounter unexpected results. Sure, it’s technically the user’s fault but it could get annoying if you’re repeatedly placing objects and it keeps rotating.
So, I think I’m going to implement some sort of threshold that after a certain point, only then does the object rotate. So I’ve decided on three sort of “thresholds”:
1- Only rotate the object if the mouse has moved x amount of pixels while the mouse button is down,
2- Only rotate if the mouse has moved x amount of studs while the mouse button is down (raycasting), or,
3- Only rotate if the mouse button is held for a certain amount of time.
Which of these is the best implementation? I’m also open to any other suggestions as well.