From 0a21aaf3fccd270b3d6a510946b7de0194db3555 Mon Sep 17 00:00:00 2001 From: Francois Belair Date: Thu, 16 Jan 2020 21:56:57 -0500 Subject: [PATCH] Fix bug using wrong random number generator --- project/demos/AvoidCollisions/Avoider.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/demos/AvoidCollisions/Avoider.gd b/project/demos/AvoidCollisions/Avoider.gd index 54b19cb..0670eb5 100644 --- a/project/demos/AvoidCollisions/Avoider.gd +++ b/project/demos/AvoidCollisions/Avoider.gd @@ -45,7 +45,7 @@ func setup( rng: RandomNumberGenerator ) -> void: rng.randomize() - _direction = Vector2(rand_range(-1, 1), rand_range(-1, 1)).normalized() + _direction = Vector2(rng.randf_range(-1, 1), rng.randf_range(-1, 1)).normalized() _update_agent() agent.max_linear_speed = max_linear_speed agent.max_linear_acceleration = max_linear_accel