Dropdown UI as a float

#1

Quick question (i hope) that is baffling me.

I would like Ui input item that is a drop down box that returns a float.
I dont seam to be able to set the values to floats.
And i’m struggling to convert an int into a float.

The reason for this is I would like to input a value between 0-24 but require more precise control than a slider gives me.

Thanks Howie

0 Likes

#2

You can type-cast variables in GLSL like this…

float someFloat = 1.0;
int someInt = int(someFloat);
float someFloat2 = float(someInt);

0 Likes

#3

Every days a school day :slight_smile:
Thank You

0 Likes