playMaker

Author Topic: Maths help please with slider[SOLVED]  (Read 1270 times)

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Maths help please with slider[SOLVED]
« on: March 08, 2022, 12:04:31 PM »
I have a slider that goes from 0 to 1
which rotates an object from 0 to 90.
To do that, I simply get the slider value every frame, multiply that by 90 every frame, which works perfect.

The problem is my other slider.
That also goes from 0 to 1
which rotates an object from 90 to 0
Now I cant get my head around the math to do the same as my other slider, but instead to rotate from 90 to 0.

I have tried multiplying the slider value by -1 and then multiplying that by 90, that doesnt work, also dividing it. Just cant work it out. I know its something simple, so what is the solution I need?
Thanks for any help
« Last Edit: March 08, 2022, 12:31:35 PM by Splankton »

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: Maths help please with slider
« Reply #1 on: March 08, 2022, 12:31:18 PM »
I solved it,
just a simple thing like it always is. I multiplied the slider value by 90.  Then subtracted the result from that from 90, so it rotates from 90 to 0.