Hi all! - Various questions on Love2d

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Lacotemale
Citizen
Posts: 75
Joined: Sat Mar 08, 2014 9:01 pm

Re: Hi all! - Various questions on Love2d

Post 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?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Hi all! - Various questions on Love2d

Post by kikito »

I explain a bit how bump works here: viewtopic.php?f=4&t=78729&p=173524#p173524
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 67 guests