Circular Sliders

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

Message
Author
User avatar
Fermeister
Posts: 13
Joined: Sat Nov 25, 2023 12:46 am

Re: Circular Sliders

#11 Post by Fermeister »

Sling wrote: Sun Jan 24, 2021 4:37 am Just use a dial but don't use it to draw the graphic. Add the graphic as a separate image and use rotate to turn the graphic between the 2 end stop angles you want. You will just need to create a rotate angle variable a bit like this.

Code: Select all

--gives 100 steps
knob_angle = var_cap(knob_angle + dir * 2.4, 0, 240)
If you draw the knob graphic in its 240 position you can use knob_angle directly in the rotate() without having to apply any offset.

Even better is to use the result of the knob position such as a dataref value to drive the rotation angle.
How can i do the last line? (Even better is to use the result of the knob position such as a dataref value to drive the rotation angle.) my dataref is a FLOAT[4]

Thanks!!!

Post Reply