Hi so I'm pretty new to Godot. I'm trying to make a ball bounce off walls and paddles in a sorta pong clone (for learning). I've hit a big snag. I found code that people use to make bounces happen but I just get "Invalid get index 'normal' (on base: 'KinematicCollision2D')."
This is the code:
`extends RigidBody2D
var velos = (Vector2(200,200))
func _physics_process(delta):
var col = move_and_collide(velos)
if (col):
velos = velos.bounce(col.normal)`
I borrowed it from another person in the help forum as it was close to the Godot 3 code I found, but updated for Godot 4. However I cannot figure out how to get the the game to not instantly crash. I've tried using a CharacterBody2D as well as a RigidBody2D.