summaryrefslogtreecommitdiff
path: root/modules/mono/editor/script_templates
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/editor/script_templates')
-rw-r--r--modules/mono/editor/script_templates/CharacterBody2D/basic_movement.cs2
-rw-r--r--modules/mono/editor/script_templates/CharacterBody3D/basic_movement.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/mono/editor/script_templates/CharacterBody2D/basic_movement.cs b/modules/mono/editor/script_templates/CharacterBody2D/basic_movement.cs
index 2ca81ab7cd..c34f1a17f3 100644
--- a/modules/mono/editor/script_templates/CharacterBody2D/basic_movement.cs
+++ b/modules/mono/editor/script_templates/CharacterBody2D/basic_movement.cs
@@ -9,7 +9,7 @@ public partial class _CLASS_ : _BASE_
public const float JumpVelocity = -400.0f;
// Get the gravity from the project settings to be synced with RigidDynamicBody nodes.
- public float gravity = (float)ProjectSettings.GetSetting("physics/2d/default_gravity");
+ public float gravity = ProjectSettings.GetSetting("physics/2d/default_gravity").AsSingle();
public override void _PhysicsProcess(float delta)
{
diff --git a/modules/mono/editor/script_templates/CharacterBody3D/basic_movement.cs b/modules/mono/editor/script_templates/CharacterBody3D/basic_movement.cs
index a6935fe497..188bbb775c 100644
--- a/modules/mono/editor/script_templates/CharacterBody3D/basic_movement.cs
+++ b/modules/mono/editor/script_templates/CharacterBody3D/basic_movement.cs
@@ -9,7 +9,7 @@ public partial class _CLASS_ : _BASE_
public const float JumpVelocity = 4.5f;
// Get the gravity from the project settings to be synced with RigidDynamicBody nodes.
- public float gravity = (float)ProjectSettings.GetSetting("physics/3d/default_gravity");
+ public float gravity = ProjectSettings.GetSetting("physics/3d/default_gravity").AsSingle();
public override void _PhysicsProcess(float delta)
{