Skip to content

Instantly share code, notes, and snippets.

@kistaaa
Last active November 12, 2022 17:58
Show Gist options
  • Save kistaaa/00aba21007dd912084a0dfd39881dd33 to your computer and use it in GitHub Desktop.
Save kistaaa/00aba21007dd912084a0dfd39881dd33 to your computer and use it in GitHub Desktop.
Godot Impulse 2D of "f" amount in a random direction
extends RigidBody2D
var f = 500
func _ready():
apply_central_impulse(Vector2(rand_range(-f, f),rand_range(-f,f)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment