[3.x] Bullet: Revert "Fixed gravity scale"#67842
[3.x] Bullet: Revert "Fixed gravity scale"#67842Klowner wants to merge 1 commit intogodotengine:3.xfrom
Conversation
This reverts commit d250ade.
d8db8bb to
4354db5
Compare
|
Also fixes #35378 |
See the PR which includes this commit: #13046. It states:
Can you confirm that this does not reintroduce #12770?
Please list it in the OP so that the issue can properly be identified as linked / closed when the PR is merged (this actually doesn't work when merging PRs in non-master branch but it's for the principle/consistency :)). |
|
Bah, thank you, I was unaware of that one. Looks like this does trigger that regression. Gravity must be affecting the body's velocity for a tick or two before the gravity scale setter is called. I'll do a little more poking. |
|
Did you have any luck looking into this further? |
|
Thanks for pinging me on this! I looked at this again today with (very) fresh eyes and I think I understand the problem but I don't have very strong feelings about any potential solutions. The problem with the regression is due to the order of things being initialized, kinda:
One idea I had was to set the RigidBody's gravity after it's added to a space to overwrite the incorrect value. Seems kinda dumb but it seems like that might be the only way to include the body's gravity scale? Any input appreciated :) |
This reverts commit d250ade which appears to have been made in error? (Looks suspicious, commented out line followed by a line which ignores the parameters in favor of a hard-coded zero vector).
Aside from ensuring the gravity vector is normalized (since it gets multiplied by
gravityMagnitude), I don't see how reverting this would cause any issues.Fixes #32196