Created
December 21, 2017 15:40
-
-
Save willnationsdev/8d3f74f890c39d24a86fac1fe21b34c1 to your computer and use it in GitHub Desktop.
Specify Jump height in Godot 2D
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export var jump_height = 128.0 # px | |
... | |
var g = ProjectSettings.get("physics/2d/default_gravity_vector").y * ProjectSettings.get("physics/2d/default_gravity") # px / s ^2 | |
var jump_velocity = sqrt(2 * g * jump_height) # px / s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment