-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bullet] Area Gravity issue #32776
Comments
After some more testing, I think I know exactly why it happens, I've made 2 collision boxes, and i left some room between them, and when the 1st one was left by the gravity that has been set in the editor's area (pre code manipulation) i pressed the button to switch the Gravity Vector and when it entered the 2nd Collision under the area it worked fine, which means that it probably needs to re-register the bodies in the area for the new Gravity Vec to work on said bodies. |
Area Project.zip
|
Seems like an issue with Bullet, since I cannot reproduce it under GodotPhysics. CC @AndreaCatania. Probably, there has to be a loop calling godot/modules/bullet/area_bullet.cpp Line 227 in 24e1039
|
Affirmative problem is in Bullet physics that is used by default, GodotPhysics works fine as it should. |
Godot version:
Godot 3.2 Alpha Official, Godot 3.1.1 stable also
OS/device including version:
Windows 10
Issue description:
Short desc:
Gravity Vec property of area applies changes fine in the editor, but when changed with code it has no effect on the Gravity
Long desc:
Changing Gravity Vec at runtime (using code ofc) fails to change the orientation of the gravity, however doing the exact same change in the scene before running and changing the gravity option works just fine, Space Override is at Replace, project settings gravity has been set to 0,0,0, and the test scene has the standard gravity of -1 on y axis set on the area (Gravity Vec in inspector of said area), and in code when action ui_up is pressed the code changes the 0,-1,0 value of the vector 3 to 0,0,-1, and takes a reading of the value of Gravity Vec before and after, showing that it Did indeed change it, however instead of the test sphere falling in the direction that it should for the new gravity vector, it keeps falling with the same vector as before.
Note: Area2D works just Fine
Steps to reproduce:
Minimal reproduction project:
Project.zip
Please note: In the Project above the Spatial Scene is the one where the code test is, other scene is exactly the same except for the change in the Area's Gravity Vec in the inspector from 0,-1,0 to 0,0,-1 which causes the code to be useless in that scene as it is set to change the Gravity Vec of the area to 0,0,-1 which in that scene it already is
The text was updated successfully, but these errors were encountered: