- Home /
Question by
SirMcsquizy · Apr 14, 2020 at 02:05 PM ·
c#rotationrotation axisz-axis
Rotate object like a safe dial
Hey all,
So I am trying to simulate a safe dial, so you can input a combination,
However while rotation the object is not the problem, it's more the mouse position I am having trouble with.
My question is, how would I rotate the object based on mouse position?
Something like this picture here:
So, if my mouse was on the left side of the object, then if I were to move the mouse up, instead of the object moving down, because the position of the mouse is negative, the object would instead upwards (on the Z axis)
Any help would be appreciated!
Thank you
Comment
Your answer
Follow this Question
Related Questions
Flip over an object (smooth transition) 3 Answers
how can i stop rotation without stopping y axis 2 Answers
Issues rotating around transform.up 2 Answers
How to lock z axis rotation 2 Answers