From 15b1b3127e636a8a63ff9cdb11dbac68f5218ffe Mon Sep 17 00:00:00 2001 From: the lemons Date: Tue, 20 Dec 2022 17:21:59 -0600 Subject: objects have velocity --- main.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index 970a0fb..84fb787 100644 --- a/main.lua +++ b/main.lua @@ -13,7 +13,10 @@ local cam = { } for i = 1, 100 do - obj.new("test", {math.random(1000), math.random(1000)}) + obj.new("test", {math.random() * 1000, math.random() * 1000}, { + avel = math.random() * 0.5 - 0.25, + vel = {math.random() * 0.5 - 0.25, math.random() * 0.5 - 0.25} + }) end local function view_scale() -- cgit v1.2.3