so im trying to code a bullet script using a rigid body 3D and its going good, but ive hit a wall and i cant figure out how to get past it
godot keeps on saying that the index "rotation" is invalid and on a null instance, idk what to do (im using 3D btw)
heres my code:
extends RigidBody3D
func _physics_process(delta):
var impulse_strength = 100
var angle = $RigidBody3D.direction3D
$RigidBody3D.apply_central_impulse(Vector2(cos(angle), sin(angle)) * impulse_strength)