Page 1 of 1
Check if player is touching
Posted: Tue Dec 11, 2012 2:20 pm
by ixjackinthebox
How can I check if a body is in contact with others?
Re: Check if player is touching
Posted: Tue Dec 11, 2012 4:01 pm
by Larsii30
Bounding Box collision
Just insert x, y, width, height for each box.
When two boxes intersect the function returns true.
Re: Check if player is touching
Posted: Tue Dec 11, 2012 5:04 pm
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.
Re: Check if player is touching
Posted: Fri Dec 14, 2012 2:10 am
by jimbobert94