Archived

This topic is now archived and is closed to further replies.

Collision detection with large background objects

This topic is 5371 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi, I am a newbie in game programming.I know how to do collision detecion with fixed-sized(32x32...etc) tiles and character sprites. But how about those large background objects with "irregular sizes" (such as those buildings in baldur''s gate)?This problem confuses me for a long time. Thanks! Acardion.

Share on other sites
The terrain in Baldur''s Gate and any other Infinity Engine game uses several layers of images to not only generate what you see, but determine visibility and collision. It''s just a pixel-map with values representing what is navigable and what is not. Characters in those games use circular (or eliptical?) collision hulls. Calculating collision between characters and terrain is therefore merely a matter of checking to see whether an impassible pixel will be within the collision hull or not.

Share on other sites
yeah, 3D math, 3D math, 3D math. aka linear algebra. you set up bounds around objects and check to see if those 3-dimensional objects are intersecting, if they are you then look to see if the actual polygons of the 2 objects are intersecting. if they are then you mark a collision and handle it appropriately.

if you''re really interested, check out some of the articles in the "Articles & Resources" section. I believe that there are many articles there on 3-D collision detection. you''ll need to know a bit of Linear Algebra to understand them, but you can probably pick up enough of the concepts to satisfy your curiosity.

http://www.gamasutra.com/features/20000330/bobic_01.htm

-me

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 9
• 13
• 82
• 11
• 10
• Forum Statistics

• Total Topics
632969
• Total Posts
3009595
• Who's Online (See full list)

There are no registered users currently online

×