summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-02-16 12:09:53 +0100
committerAaron Franke <arnfranke@yahoo.com>2021-05-05 22:49:06 -0400
commit4a28f7e44f99e5c8cab13b4eca4819e483469b07 (patch)
tree8abcaccc3fef1311b2f47720c5ba6cc8962ea24c /scene/resources
parent758bccf364729474f8ffbcf15a0bb6e9bad02d9c (diff)
Increase the default 2D gravity to 980.0
This makes 2D RigidBody physics feel less floaty out of the box. This closes https://github.com/godotengine/godot-proposals/issues/98.
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/world_2d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index ccdc5bebd0..0a0742753f 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -357,7 +357,7 @@ World2D::World2D() {
// Create and configure space2D to be more friendly with pixels than meters
space = PhysicsServer2D::get_singleton()->space_create();
PhysicsServer2D::get_singleton()->space_set_active(space, true);
- PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/2d/default_gravity", 98));
+ PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/2d/default_gravity", 980.0));
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF("physics/2d/default_gravity_vector", Vector2(0, 1)));
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF("physics/2d/default_linear_damp", 0.1));
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_linear_damp", PropertyInfo(Variant::FLOAT, "physics/2d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));