fix: non-uniform scaling #1

Merged
zakarya merged 1 commits from flxw/quality-godot-first-person:fix/non-uniform-scaling into main 2025-02-17 18:11:46 -08:00
Contributor

Hey there,
this pull request changes the crouch behavior. Instead of changing the scale of the Mesh and CollisionShape3D only on one axis, the height of the Mesh/Shape should be changed, as non-uniform scaling is not supported by the Jolt physics engine (and it is also not recommended for CollisionShape3Ds when using the default physics engine, which you can see in the screenshot below)
image.png

This error occurs when crouching while using the Jolt physics engine:
image.png

The reason why I propose this change directly here instead of changing it only locally for me (as it is bound to an specific addon) is that the Jolt physics engine will be included by default in the engine with Godot 4.4. Also, as this change does not break the crouch behavior with the default Godot physics engine, there is pretty much no reason to not change this to the default behavior.

Hey there, this pull request changes the crouch behavior. Instead of changing the scale of the Mesh and CollisionShape3D only on one axis, the height of the Mesh/Shape should be changed, as non-uniform scaling is not supported by the Jolt physics engine (and it is also not recommended for CollisionShape3Ds when using the default physics engine, which you can see in the screenshot below) ![image.png](/attachments/48ee7c2c-897d-4a08-a136-367ca78f86c2) This error occurs when crouching while using the Jolt physics engine: ![image.png](/attachments/10bb6e85-5923-4595-9d6d-2ff77b7998db) The reason why I propose this change directly here instead of changing it only locally for me (as it is bound to an specific addon) is that the Jolt physics engine [will be included by default in the engine with Godot 4.4](https://godotengine.org/article/dev-snapshot-godot-4-4-dev-7/#jolt-physics-module). Also, as this change does not break the crouch behavior with the default Godot physics engine, there is pretty much no reason to not change this to the default behavior.
flxw added 1 commit 2025-02-15 05:32:22 -08:00
Owner

Looks good, I'll test it on Monday. Thanks for the PR! (It's currently 10:31 PST for me so I need to sleep)

Looks good, I'll test it on Monday. Thanks for the PR! (It's currently 10:31 PST for me so I need to sleep)
zakarya merged commit a65dd2614b into main 2025-02-17 18:11:46 -08:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ColormaticStudios/quality-godot-first-person#1
No description provided.