PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Colision detection

Hi,

Can someone please give me some lights on how can I make an object stop, and stay in the same position after a colision detection?

I'm using something like this to mantain the current position, but sometimes the object will continue to move:

// Here i calculate the position of the object

//Test the colision with CGapiSurface::Intersect

if ( intersection.x != -1 )
{
pos_objectX = pos_objectX_colision;
pos_objectY = pos_objectY_colision;
}


I'm new at this, so be patient... :roll:

Thanks!