playMaker

Author Topic: Rotate object to change UI numbers  (Read 1502 times)

gamedivision

  • Full Member
  • ***
  • Posts: 227
Rotate object to change UI numbers
« on: June 25, 2017, 06:33:00 PM »
basically, i have a thermostat with a visual temperature as i rotate the control knob it changes the UI numbers from 0 to 30 degrees.clockwise temp goes up counter goes down.
im just not sure where to start really i mean i have the rotate sorted just linking the numbers to the rotation is where im struggling

thanks

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Rotate object to change UI numbers
« Reply #1 on: June 26, 2017, 06:17:56 AM »
what ive done at the moment instead of over thinking, is take the local rotation of the object im rotating storing in a float then convert the float to string with a 0.0 decimalization then i could just clamp the values 0 - 30

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Rotate object to change UI numbers
« Reply #2 on: June 26, 2017, 07:12:13 AM »
its rotating in a single axis right? take note of the min and max values, and use Float Remap to convert it to 0-30, and then do what you did and clamp + convert to string.

(unless the min and max happen to already be 0-30 of course)