Code: Select all
for (int i=0;i<numManifolds;i++)
{
btPersistentManifold* contactManifold = collisionWorld->getDispatcher()->getManifoldByIndexInternal(i);
btCollisionObject* obA = static_cast<btCollisionObject*>(contactManifold->getBody0());
btCollisionObject* obB = static_cast<btCollisionObject*>(contactManifold->getBody1());
pho::Asset* a = static_cast<pho::Asset*>(obA->getUserPointer());
Any ideas how I can debug it? gdb shows me that my ray has hit the correct object (coHeart)
https://dl.dropboxusercontent.com/u/147 ... er-bug.png
but for some reason coHeart does not give me the pointer to the heart asset. They are both private member variables in my class so there's no chance of the heart object being destroyed or going out of scope etc.
Any ideas on what to try to debug it?