Collision Detection Without Objects Moving Each Other?

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
joey_green
Prole
Posts: 3
Joined: Tue Jan 24, 2012 9:01 pm

Collision Detection Without Objects Moving Each Other?

Post by joey_green »

I'm working on a prototype and am wanting to know when two game objects are touching each other. For instance, a character collecting stars for points. I don't need any physics for something like this, I just need to know when they are touching each other.

Does love have something like this built in?

I've used Box2d in Cocos2d and there's something called a sensor that does something like this in Cocos2D. I'm looked for this in love but can't find anything.

Any ideas or should I roll my own solution?
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: Collision Detection Without Objects Moving Each Other?

Post by tentus »

If you're just looking for detection I'd recommend HardonCollider, a collision detection library for Love.
Kurosuke needs beta testers
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Collision Detection Without Objects Moving Each Other?

Post by bartbes »

joey_green wrote:there's something called a sensor that does something like this in Cocos2D.
Box2D has those too, and therefore, so does love.physics.

Here we go: Shape:setSensor
User avatar
ivan
Party member
Posts: 1918
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Collision Detection Without Objects Moving Each Other?

Post by ivan »

It should be noted that Box2D (2.0.1 not sure about later versions) doesn't report collisions between 2 static shapes.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], TurboYeti and 4 guests