Any way to change image size with sliders?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kukuism21

Question is in title. Any suggestions? Thanks!

is this something you want to implement in a game, or in the editor?

Millard | 2020-10-26 16:12

:bust_in_silhouette: Reply From: Afely

If they’re both in the same scene, it should be relatively simple. Just create a Slider
node of the desired size and set Sprite.scale to Vector2(Slider.value, Slider.value)
Here’s what it would look like in editor:

extends Node

func _process(delta):
  $Sprite.scale = Vector2($Slider.value, $Slider.value)