rigid bodies stops colliding

xakepp35
Posts: 7
Joined: Tue Aug 21, 2012 6:07 pm

rigid bodies stops colliding

Post by xakepp35 »

i have written some kind of simple dynamics world analog, using opencl bullet3
i am doing step simulation in following manner:

Code: Select all

_narrowPhase->writeAllBodiesToGpu();
_broadphaseSap->writeAabbsToGpu();
_rigidPipeline->writeAllInstancesToGpu();
_rigidPipeline->stepSimulation( timeDelta );
_narrowPhase->readbackAllBodiesToCpu();
i am working with rigidbodies directly by means of array, provided with _narrowPhase->getBodiesCpu();
i have registered 3 spheres with radius 512, and 3 rigid bodies with mass 512;

first sphere is controlled via keyboard by means of m_linVel/m_angVel variables, which are written to gpu before simulation.
also camera matrix is being calculated from its pos and orientation, which are read to cpu after simulation.
spheres 2 and 3 are rendered on screen just where they are
i am basically controlling its motion, by applying some impulse to it, and do run simulation, trying to sphere2 and sphere3 with my sphere1

under certain circumstances (i can not figure out which) spheres resume flying, but stop colliding.
also, if i place third sphere at (0,0,1024) i can collide with it for some (variable) time
if i place it at (0,1024,0) i can not, but i can hit second sphere, placed at (0,0,0) which can hit third sphere.
coordinates are in between -8192.0, +8192.0, velocities are not so high.

What could be the point, doc?