[SOLVED] Body Does Not Respond to Collisions

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.
Post Reply
User avatar
i_love_u
Prole
Posts: 28
Joined: Sat Nov 29, 2014 12:13 am

[SOLVED] Body Does Not Respond to Collisions

Post by i_love_u »

:awesome: How do you specify a body, that when collided with a dynamic body, does not call the function:

Code: Select all

function beginContact(a, b, coll)
 --code here
end
I need it to still collide with the object, though.

I do not think that the type specification works for this..??
https://love2d.org/wiki/BodyType

Any help would be greatly appreciated! :awesome: :crazy: :huh: :cool:
Last edited by i_love_u on Sat Dec 06, 2014 7:09 pm, edited 1 time in total.
User avatar
Azhukar
Party member
Posts: 478
Joined: Fri Oct 26, 2012 11:54 am

Re: Body Does Not Respond to Collisions

Post by Azhukar »

You can use fixture masks and categories to disable collisions between other fixtures.

https://love2d.org/wiki/Fixture:setMask
https://love2d.org/wiki/Fixture:setCategory

Bodies do not collide with bodies, fixtures collide with fixtures. Body is an abstract object containing a number of fixtures, or none at all. Fixtures represent the "physical" part of your bodies.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 12 guests