Check if player is touching

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
ixjackinthebox
Prole
Posts: 45
Joined: Sun Apr 29, 2012 6:00 pm

Check if player is touching

Post by ixjackinthebox »

How can I check if a body is in contact with others?
User avatar
Larsii30
Party member
Posts: 267
Joined: Sun Sep 11, 2011 9:36 am
Location: Germany

Re: Check if player is touching

Post by Larsii30 »

Bounding Box collision
Just insert x, y, width, height for each box.
When two boxes intersect the function returns true.
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Check if player is touching

Post by ivan »

I assume you are talking about Box2D.
There are several ways to do this.
One approach is setting a contact/collision callback and buffering the collision data you get from there.
jimbobert94
Prole
Posts: 16
Joined: Mon Jun 25, 2012 7:17 am

Re: Check if player is touching

Post by jimbobert94 »

I would strongly suggest hardon collider.

http://vrld.github.com/HardonCollider/tutorial.html
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 76 guests