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!
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!