- Home /
Question by
beeperjunt · Jun 13, 2020 at 09:19 PM ·
rotationlerptouch controlsslerpalignment
Align object rotation to set positions.
I'm trying to rotate an object smoothly(i.e. lerp/slerp and anything else..) through set positions on the y-axis. The object should automatically align itself to the nearest position, essentially 'snapping' itself in place through rotation. The controls are touch, therefore, the player should drag their finger across the screen which would make the object rotate, only to set positions 'seamlessly'. Or.....as an alternative solution, rotating an object by lerping/slerping the object in increments of 90 degrees. I already have the touch rotation mechanics in place, but if someone could come up with a way of aligning the object rotation to set positions(or the alternative solution) that would be amazing!
Comment