This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

I have a several button on scroll container and I want to center the view on a specific button when the scene start without loosing the ability to scroll
I tried to use scroll_horizontal property to specify the current horizontal scroll value in the ready function but It doesn't work no matter what value I use

in Engine by (118 points)

Can you post your code?

not much of a code

a little script attached to the scrollcontainer
changing the scroll_horizontal property in the editor show the desired effect but when playing the scene the it goes back to 0

extends ScrollContainer

func _ready():
    pass # Replace with function body.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.