[Box2D][v0.7.2] Sensor only for certain categories

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
AaronWizard
Citizen
Posts: 68
Joined: Sun Nov 06, 2011 2:45 pm
Location: Canada

[Box2D][v0.7.2] Sensor only for certain categories

Post by AaronWizard »

As far as I'm aware, you can either set a shape to be a sensor, where it will pass through everything but collisions will be detected, or you can set a shape's category and mask to make it pass through certain other shapes without collisions being reported.

Is it possible to set a shape so that it will pass through other shapes of a certain category, with the collisions being detected like with a regular sensor, while the shape collides normally against all other shapes?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [Box2D][v0.7.2] Sensor only for certain categories

Post by kikito »

Two shapes, sensor and non-sensor, should do the trick.
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: Yolwoocle and 227 guests