What is the Simplest Collision System You Can Think Of?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
kabbotta
Halfling
Posts: 50
Joined: Wed Mar 04, 2015 4:38 am
Location: United States
x 9

What is the Simplest Collision System You Can Think Of?

Post by kabbotta »

I'm creating a game that is somewhat similar to Knights of the Old Republic. There won't be any jumping and relatively simple floorplans. I highly doubt I will need a full physics engine. I'm not even sure I'll need gravity.

So what is the simplest collision system you can imagine for a limited scenario like this? The most dynamic thing I'll need is the ability to walk up slanted surfaces. There will be no complicated bullet collisions or pixel-perfect object collision needed at all. It will just be collisions with generally blocky objects.
"You owe it to yourself, to know it to yourself."
PhilipLB
Google Summer of Code Student
Google Summer of Code Student
Posts: 550
Joined: Thu Jun 04, 2009 5:07 pm
Location: Berlin
x 108

Re: What is the Simplest Collision System You Can Think Of?

Post by PhilipLB »

Sphere vs. Sphere is more than easy but might not do it here.
Axis Aligned Bounding Boxes are simple, too. But I think you want to rotate your entities. So Bounding Boxes would do it IMHO.
Google Summer of Code 2012 Student
Topic: "Volume Rendering with LOD aimed at terrain"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Mattan Furst


Volume GFX, accepting donations.
amartin
Halfling
Posts: 87
Joined: Wed Aug 14, 2013 6:55 am
Location: Norway
x 13

Re: What is the Simplest Collision System You Can Think Of?

Post by amartin »

The simplest collision system is to use Minimal ogre collision with two rays one down and one in the direction of travel. The down ray handles moving you up and down the other ray stops you walking through things. Add extra rays for additional complexity as desired.
User avatar
Herb
Orc
Posts: 412
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI
x 38

Re: What is the Simplest Collision System You Can Think Of?

Post by Herb »

agree with amartin, but keep in mind that will do bounding box collisions. If your bounding boxes are fairly tight to models, that should work good. You can also do raycasting down to the polygon level (search in the Ogre wiki to find it), but it's more expensive. I've found in my simple games, that I use a mix of both depending on the accuracy needed for each case.
kabbotta
Halfling
Posts: 50
Joined: Wed Mar 04, 2015 4:38 am
Location: United States
x 9

Re: What is the Simplest Collision System You Can Think Of?

Post by kabbotta »

The minimal Ogre collision system looks like just about what I wanted. Thanks, guys!
"You owe it to yourself, to know it to yourself."
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: What is the Simplest Collision System You Can Think Of?

Post by Zonder »

I suggest you have a read of this article it explains the benefit of using an ellipsoid instead of a sphere for collision detection for humanoids. I would first use a AABB collision detection to get potential collision surfaces first then use the ellipsoid method after.

http://www.gamedev.net/page/resources/_ ... -ell-r1026
There are 10 types of people in the world: Those who understand binary, and those who don't...
Post Reply