Hello.<br><br>I want to port my game from unity to Godot. And my game uses planetary gravity. I know that it is a simple way to make this thing into Godot. How to make planetary gravity with areas?<br>
Planetary Gravity
You first have to change the space override mode. When set to AREA_SPACE_OVERRIDE_COMBINE ("Combine" in the editor) the area will add it's gravity and damping. There is an option to make it a point source. When enabled the gravity vector is the center of gravity instead of direction. Use gravity_distance_scale to change how fast the strength of gravity decreases with the square of distance.<br>
- Edited
Ok, I've changed space override mode but other object just failing down.<br><br>Here is the screenshot.<br><br><img src="https://pp.vk.me/c626320/v626320154/26781/a2m3DOF1f2o.jpg" alt="" title="Image: https://pp.vk.me/c626320/v626320154/26781/a2m3DOF1f2o.jpg"><br>
Well I got it to work buy setting the Gravity Distance Scale down to zero, and setting the Gravity Vec to (0,0,0)<br>heres the screen shot<br><img title="Image: https://s16.postimg.org/hp67eahf9/Kazam_screenshot_00002.png" alt="" src="https://s16.postimg.org/hp67eahf9/Kazam_screenshot_00002.png"><br><br>
I should have sayed more about gravity_distance_scale. You should use small values. With a value of 100 the effective range will be something like 0.01. And the damping should be set to 0 as ist will affect the overlapping bodies.<br>
That's working. Thank you. And how to set global gravity vector to zero (no global gravity)?<br><br>