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.

btPoolAllocator error

2 posters

Go down

btPoolAllocator error Empty btPoolAllocator error

Post  jj 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

Back to top Go down

btPoolAllocator error Empty Re: btPoolAllocator error

Post  sio2interactive 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...
sio2interactive
sio2interactive

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

http://sio2interactive.com

Back to top Go down

Back to top

- Similar topics

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