Godot Version
I’m new to GoDot and programming, i watch some tutorials how to bounce a ball in godot but none of them seems to work anymore (or i’m dumb). anyways all my ball can do is to fall on the ground like a stone. Am I missing something?
extends CharacterBody2D
var gravity = 300
func _process(delta):
velocity.y += gravity * delta
move_and_slide()
if is_on_floor():
velocity.y = -abs(velocity.y)
func _on_Body_entered(body):
velocity.y = -abs(velocity.y)
I’m new on this site