Physics help

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
schme16
Party member
Posts: 127
Joined: Thu Oct 02, 2008 2:46 am

Physics help

Post by schme16 »

I'm not really familiar with 2D BOX so I'm not sure if its possible... but I was wanting to know if there's a way of making two graphics detect collision.

I can only find a way of doing this by attaching a rectangle circle or polygon (max of 16 points I think, and I can't really figure out how vertexes work... needs me a vertex co-ordinate maker lol). But I wanted to know if it can just figure out a bounding box based on the graphic.


And if not, can anyone tell me how I can make a "ground" that's more realistic than just a flat plane.

Thanks for any help... and to rude for the engine!
My Development Diary - http://shanegadsby.info
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Physics help

Post by rude »

I don't understand what you want ... do you want pixel-per-pixel collision detection? I would strongly discourage that.

Or perhaps your problem is that you need concave shapes. Box2D does not support concave shapes, but it does support multiple convex shapes attatched to the same body. This allows you to create any shape, as long as you decompose it into convex polygons.
User avatar
schme16
Party member
Posts: 127
Joined: Thu Oct 02, 2008 2:46 am

Re: Physics help

Post by schme16 »

The second one, that's what I was asking about Thanks for phrasing it better and answering my question.
Is there a program I can use to get the convex shape points or do I have to do it point by point?
My Development Diary - http://shanegadsby.info
Post Reply

Who is online

Users browsing this forum: No registered users and 97 guests