Sadly changing the project settings does not affect the value after the game launches. I don’t think you want to change the overall gravity either though. If you could share how you are applying gravity, either from get_gravity()
or a var gravity
near the top of the script.
Then you can apply more speed if the action is pressed
if not is_on_floor():
if Input.is_action_pressed("ui_down"):
velocity += get_gravity() * 3 * delta
else:
velocity += get_gravity() * delta
The if statements above are also suspicious, if your intent is to only rotate when right or left is pressed you should use Input.is_action_pressed
, and you can chain these together with or
if you want more available actions, but you should use your own actions from the Project settings “Input Map” tab; instead of ui_*
actions.
if Input.is_action_pressed("ui_right") or Input.is_action_pressed("ui_text_scroll_down"):
You could also use get_axis
, again preferably using custom actions
var rotate_amount: float = Input.get_axis("turn_right", "turn_left")
$MeshInstance3D.rotate_z(rotate_amount * 0.15)
$GPUParticles3D.emitting = is_zero_approx(rotate_amount)
Make sure to paste scripts instead of screenshots