TSnake41/raylib-lua

My collision system no longer works

Closed this issue · 1 comments

I updated the binary (its the only change I made to the code) and now the program ignores collisions

function collision()
	 local collision = false
	 for k,v in pairs(o) do
			if rl.CheckCollisionBoxes(
				 {{ pl.pos.x - pl.size.x/2, pl.pos.y - pl.size.y/2, pl.pos.z - pl.size.z/2 },
						{ pl.pos.x + pl.size.x/2, pl.pos.y + pl.size.y/2, pl.pos.z + pl.size.z/2 }},
				 {{ o[k][1][1] - o[k][2][1]/2, o[k][1][2] - o[k][2][2]/2, o[k][1][3] - o[k][2][3]/2},
						{ o[k][1][1] + o[k][2][1]/2,	o[k][1][2] + o[k][2][2]/2, o[k][1][3] + o[k][2][3]/2 }}) == false  then
				 collision = false
			else
				 collision = true
				 break
			end


			return collision
	 end
end

the function was taken from a raylib example and as I said it was totally working and shiet but now it no longer works 😢

never mind today its not my day, solved it im dumb