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

What is the Simplest Collision System You Can Think Of?

Post by kabbotta » Tue May 05, 2015 7:24 am

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.
0 x
"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

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

Post by PhilipLB » Tue May 05, 2015 10:01 am

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.
0 x
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

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

Post by amartin » Tue May 05, 2015 1:27 pm

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.
0 x

User avatar
Herb
Orc
Posts: 412
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI
x 1

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

Post by Herb » Tue May 05, 2015 1:47 pm

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.
0 x

kabbotta
Halfling
Posts: 50
Joined: Wed Mar 04, 2015 4:38 am
Location: United States

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

Post by kabbotta » Wed May 06, 2015 8:25 pm

The minimal Ogre collision system looks like just about what I wanted. Thanks, guys!
0 x
"You owe it to yourself, to know it to yourself."

User avatar
Zonder
Ogre Magi
Posts: 1132
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 22

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

Post by Zonder » Thu May 07, 2015 8:23 am

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
0 x
There are 10 types of people in the world: Those who understand binary, and those who don't...

Post Reply