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.

physics thread problem

2 posters

Go down

physics thread problem Empty physics thread problem

Post  sctm81 Tue May 12, 2009 3:02 am

I am using a thread like templatePhysicCullingThread( void *_ptr ) in tutorial 6_2 to call the functions

sio2PhysicRender( sio2->_SIO2physic, 1.0f / 60.0f, 1 );
sio2ResourceCull( _SIO2resource, sio2->_SIO2camera );

to simulate the physics of 2 objects. For some reason the simulator runs for 1 second and then gets stuck at an unidentified location. Any clues anyone? Do I need an extra sleep command in the thread?

sctm81

Posts : 29
Join date : 2009-04-24

Back to top Go down

physics thread problem Empty Re: physics thread problem

Post  sio2interactive Tue May 12, 2009 3:46 am

Are you messing around with the btRigidBody in the main thread? Cuz Bullet is not thread safe... The only operation that you are allowed to do is read the matrix... any other write operation handled by Bullet will result into a segfault.
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