Skip to content

doc: Use physics_factor in all example snippets#461

Merged
elementbound merged 1 commit intofoxssake:mainfrom
russ-:use-physics-factor-consistently-in-docs
Jun 8, 2025
Merged

doc: Use physics_factor in all example snippets#461
elementbound merged 1 commit intofoxssake:mainfrom
russ-:use-physics-factor-consistently-in-docs

Conversation

@russ-
Copy link
Copy Markdown
Contributor

@russ- russ- commented May 28, 2025

I'm trying out Netfox and was confused why my velocity was suddenly infinite. I eventually double checked the caveats page and saw that I'd miss the /= line after my call to move_and_slide().

Changing all of the docs to consistently do the divide after calling move_and_slide() will help others avoid stubbing their toes on this as they try out Netfox.

I guess this results in 3 extra float divides per _rollback_tick call if your game *does *reset velocity for each tick, but that seems like a less common usage since move_and_slide alters velocity on collision to implement the "slide" behavior.

@elementbound elementbound changed the title Updates a couple spots in the docs to divide by physics_factor after calling move_and_slide. doc: Use physics_factor in all example snippets May 29, 2025
@elementbound
Copy link
Copy Markdown
Contributor

Thanks for the PR, looks good at first glance! Will return to it a bit later for a proper check

@elementbound elementbound merged commit 52f03dc into foxssake:main Jun 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants