FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Bug in sio2PhysicRemoveObject

2 posters

Go down

Bug in sio2PhysicRemoveObject Empty Bug in sio2PhysicRemoveObject

Post  matt Fri Oct 03, 2008 5:13 pm

There's a bug in the sio2PhysicRemoveObject method.

It reads,
Code:
void sio2PhysicRemoveObject( SIO2physic *_SIO2physic,
                      SIO2object *_SIO2object )
{
   int i = 0;

   while( i != _SIO2physic->_btDiscreteDynamicsWorld->getNumCollisionObjects() )
   {
      btCollisionObject *_btCollisionObject = _SIO2physic->_btDiscreteDynamicsWorld->getCollisionObjectArray()[ 0 ];

but the array should be addressed with the current index [ i ] in order to search for the object to be removed.

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

http://elfrun.net

Back to top Go down

Bug in sio2PhysicRemoveObject Empty Re: Bug in sio2PhysicRemoveObject

Post  sio2interactive Fri Oct 03, 2008 8:23 pm

Totally right, tks! and the same thing in sio2PhysicRemoveCamera()

it should be like this:

Code:

   int i = 0;

   while( i != _SIO2physic->_btDiscreteDynamicsWorld->getNumCollisionObjects() )
   {
      btCollisionObject *_btCollisionObject = _SIO2physic->_btDiscreteDynamicsWorld->getCollisionObjectArray()[ i ];

sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum