godotengine / godotengine/godot-docs

Integrate_forces() example missing the point

Open
#10,029 1 comment 4 reactions 0 assignees View on GitHub
area:manual content:example code enhancement topic:physics
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

V4.3

The code snippet meant to demonstrate how `_integrate_forces()` can be used to make direct changes to Rigidbody properties, that otherwise would interfere with the physics simulation, doesn't overwrite any of those properties. In fact, all the code could run in `_physics_process()` as well, so it's completely missing the point of the description above.

As an example it could change the `rotation` of the body's state transform directly when steering. Then using `_integrate_forces()` would at least be necessary in this context.

[Docs Page](https://docs.godotengine.org/en/stable/tutorials/physics/physics_introduction.html#using-rigidbody2d)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.