Page 4 of 4

Re: Hi all! - Various questions on Love2d

Posted: Sun Sep 07, 2014 4:22 pm
by Lacotemale
So I came back to working on my game again. I have the standing animation in place. I also have the beginning of my old main menu system.

Trying to have a go at collision detection. Certain this doesn't seem as easy as my previous tool. :S

Code: Select all

--Inside love.load()

world = bump.newWorld(50)

	-- create two rectangles
	A = {name="A"}
	B = {name="B"}

	-- insert both rectangles into bump
	world:add(A,   player.x, player.y, 100, 100) -- left, top, width, height
	world:add(B, item.x, item.y, 100, 100)

--Inside love.update(dt)

-- see if A is colliding with anything
local collisions, len = world:check(B)
Am I using this bump lib wrong?

Re: Hi all! - Various questions on Love2d

Posted: Mon Sep 08, 2014 8:59 pm
by kikito
I explain a bit how bump works here: viewtopic.php?f=4&t=78729&p=173524#p173524