playMaker

Author Topic: rotation on z Axis  (Read 1049 times)

gamedivision

  • Full Member
  • ***
  • Posts: 227
rotation on z Axis
« on: May 28, 2016, 04:59:12 PM »
i have this room thermostat that rotates on the z axis and ive clamped the rotation so it moves only from 10 degrees to 30 degrees
im using getMouseX and getMouseY storing those inside a getAtan2 then storing that value inside an angle float variable
then im using the float clamp and then i set rotation on the zAxis
so as i move my mouse the thermostat control knob rotates based off my mouse movement, my problem is i want to add to the movement instead of at the moment its based entirely where the mouse is on screen so if i click on a point on the screen it will move to that specific point.
i suppose a rotate add based of my movement

thanks