# How do I set Scroll Deceleration Rate?

**URL:** <https://forum.godotengine.org/t/how-do-i-set-scroll-deceleration-rate/1986>\
**Category:** Archive\
**Created:** [May 1, 2023, 7:04pm UTC](https://forum.godotengine.org/t/how-do-i-set-scroll-deceleration-rate/1986 "2023-05-01T19:04:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://forum.godotengine.org/uploads/default/original/2X/4/4b0a7fa8a6334634b94a13d421f0d99e6f04e21f.svg) [@system](https://forum.godotengine.org/u/system)\
**Post date:** [May 1, 2023, 7:04pm UTC](https://forum.godotengine.org/t/how-do-i-set-scroll-deceleration-rate/1986/1 "2023-05-01T19:04:47Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Attention** | Topic was automatically imported from the old Question2Answer platform. |
| 👤 | **Asked&nbsp;By** | MrCentipete |

Hello everyone,

I’m trying to edit the scroll deceleration rate for a ScrollContainer with a child uHBoxContainer in my project in Godot 4.0.1, but I can’t seem to find a way to do it. The scroll is moving too fast and I need it to be smoother.

I’m using a ScrollContainer node, and inside this ScrollContainer is a child node HBoxContainer.

I’ve tried searching the documentation online, but I haven’t found a solution to the problem. I also tried Godot 3.5.2 with the same results.

Does anyone know how I can adjust the scroll deceleration rate for this specific configuration in Godot 4.0.1? Is there any specific setting or code I need to change?

I appreciate any help or advice you can provide. Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://forum.godotengine.org/uploads/default/original/2X/4/4b0a7fa8a6334634b94a13d421f0d99e6f04e21f.svg) [@system](https://forum.godotengine.org/u/system)\
**Post date:** [May 2, 2023, 6:06am UTC](https://forum.godotengine.org/t/how-do-i-set-scroll-deceleration-rate/1986/2 "2023-05-02T06:06:15Z")

</div>

| | | |
| --- | --- | --- |
| 👤 | **Reply From:** | ibrahim.semab |

To adjust the scroll deceleration rate for a ScrollContainer in Godot 4.0, you can use the set\_scroll\_deceleration method.

In your case, you can access the ScrollContainer node and call set\_scroll\_deceleration to adjust the deceleration rate. Here’s an example:

```auto
# Access the ScrollContainer node
var scroll_container = $ScrollContainer

# Set the scroll deceleration rate to 500
scroll_container.set_scroll_deceleration(500)

```

You can experiment with different values to find the deceleration rate that works best for your project. The higher the value, the faster the scroll will decelerate.

You can call this method in your \_ready function or in response to user input events like scrolling or swiping.

I hope this helps! Let me know if you have any further questions.

This feels like a misguided ChatGPT (or similar) answer. I’m unaware of a `set_scroll_deceleration` method or a `scroll_deceleration` property on a `ScrollContainer` in Godot 4…

jgodfrey | 2023-05-02 13:10

There is no function called `set_scroll_deceleration` for the ScrollContainer, this looks like a response generated by ChatGPT. There is no such function in the documentation either.

MrCentipete | 2023-05-02 14:54

Sorry, I forgot to mention that in Godot 4.0, the `set_scroll_deceleration()` method has been replaced by the `set_scroll_smooth_enabled()` method.

ibrahim.semab | 2023-05-02 15:53

Again, there is not `set_scroll_smooth_enabled()` that is just an answer generated by AI.

MrCentipete | 2023-05-02 16:08

@ibrahim.semab has been asked to stop posting unvetted, AI-generated answers. Hopefully, this sort of unhelpful input will stop now.

jgodfrey | 2023-05-02 17:56
