btPoolAllocator error

View previous topic View next topic Go down

btPoolAllocator error

Post  jj on Fri Oct 31, 2008 5:16 am

On sensorCollision I'm having crash problems in btPoolAllocator.h

Could you please provide more detailed explanation/example of how to use:
Code:

_SIO2sensorMySensor = sio2SensorInitCollision( "mySensor1",
                        _ball1,
                             _ground,
                        groundBounce );

and the callback function:
Code:

void groundBounce( void * )
{

        sio2PhysicStop(sio2->_SIO2Physic);

   templateAppDelegate *delegate = [[UIApplication sharedApplication] delegate];

   if (soundOption == 1) sio2SoundPlay( _groundBounceSound );   
   
   if (playerTurn == [delegate assignedPlayerNum]) { //if it is the assigned player's turn to throw ball
      //if the ground bounces is greater than 3, then he missed his target
                if (groundBounceNumber > 3) {
         templateTargetMissed();
      }
      groundBounceNumber += 1;
   }
}

1) Does this implementation look correct? I'm not sure what the btManifold is....????
2) Do I need to be passing/reading something in the: void groundBounce( void * _somethingHere) ?

EDIT: I notice now that inside the callback function I am attempting to stop the physic. This line is causing crash:

sio2PhysicStop(sio2->_SIO2physic);

Any thought as to why? Can I include this inside the collisionCallback function?

jj

Posts : 77
Join date : 2008-09-24

View user profile

Back to top Go down

Re: btPoolAllocator error

Post  sio2interactive on Fri Oct 31, 2008 8:21 pm

That should be correct, however try to comment sio2PhysicReset inside the sio2PhysicStop function and tell me if it fix the problem...
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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