News

Collisions

Posted by Liesl Wigand on April 20, 2010 at 11:15 PM

Ok so:


Entity class has a function: const AxisAlignedBox & getBoundingBox (void) const


which if we use on two boats that are known to be close (since we don't want to constantly check every boat every tick), then we can use the:

AxisAlignedBox Ogre::AxisAlignedBox::intersection ( const AxisAlignedBox &  b2  )  const


or more likely:

bool Ogre::AxisAlignedBox::intersects ( const AxisAlignedBox &  b2  )  const


function to find out if they intersect, and if they do we may assume they collided.


Problem:

If boats are diagonal, then boxes may collide but not boats, yet it will count as a collision.


Where and how to check for collisions:

in a tick function, but where? Has to have access to list of state entities.

How to make this fast? With hundreds or boats and each checking for colisions each tick...


We need to look at some of those existing collision detection systems and see if they have a better way (or if we can even understand what they're doing).  


But first, we must fix Helm and MoveTo



Categories: None

Post a Comment

Oops!

Oops, you forgot something.

Oops!

The words you entered did not match the given text. Please try again.

Already a member? Sign In

0 Comments