Increase or decrease uv scale parameters using slider

Hi,

Using Slider i am trying to increase or decrease UV scale parameters dynamically.
In the UI slider control am unable to get methods to detect right or left control actions
Pls suggest

Thanks
vij

You should use onValueChangedObservable on a slider, like: Using GUI slider | Babylon.js Playground (babylonjs.com)

1 Like

Thanks @carolhmj this was very close to the solution

I just tried by yur logic, the issue i am facing is
if i try to increase the slider based on degres, the uv values are going infinite. the upper thresold for uvscale values is “30”, how i can i set this parameter

Check the documentation, slider has minimum and maximum parameters: Slider | Babylon.js Documentation (babylonjs.com)

1 Like

Yes. As per @carolhmj. Something like this, may be:

Edit: Forgot to mention that you can also use steps (slider.step). Might avoid having patterns in the selection that do not look all too good :grin:

Actually, the scale does not use degrees. It’s, well… a scale (linear) :grin: :wink:

1 Like