Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: kavery on March 04, 2019, 11:29:02 AM
-
I'm using a Vive controller and getting the touchpad axis V2. I'm then converting that to an HSV value so you can change the Hue of something by sliding around on the touchpad.
But instead of -1 to 1, I would like it to be 0 to 1 (but actually 0 to 255 after I set a multiply of 255, which right now becomes -255 to 255)
Any help would be swell, thanks!
-
I might have a solution - using float compares to jump between 2 states, one when you are above 0 and the other below 0. Then each state uses math differently to transition through each half of the 255 spectrum.
Would love to know if there is a simpler approach, but this isn't too bad.
-
Use float absolute, or float remap — the latter from the ecosystem.