1
I have a table with several 5 position Tables where the first two are the position in a Cartesian plane.
--Table with water collors
colors = {{r=15,g=94,b=156},{r=35,g=137,b=218},{r=28,g=163,b=236},{r=90,g=188,b=216},{r=116,g=204,b=244}}
points = {}
for i=1,10000 do
j = love.math.random(1,table.getn(colors)-1)
table.insert(points,{i,i,colors[j].r,colors[j].g,colors[j].b})
I’m making a method to change the position (the first two positions of the vector) of this object, but for this I need to know if there are any objects on top of each other, ie if the first two values of the table coincide with the value of another table, I’m assuming that comparing one by one is unviable,?
LÖVE contains collision detection functions: https://love2d.org/wiki/love.physics
– lhf
@lhf normally the Löve2d physics library is not the best option because it is very confusing and has few examples. In fact most of her objects don’t even have an example of how to use, I had to study implementations of Box2d in other languages to get an idea of how to use.
– prmottajr