esset
06-11-2010 22:41:06
So, as the title says; raycasting crashes the game.
Im using VS and im getting NxOgre::PhysXInternalErrorException aswell as NxOgreScene.cpp with lots of uninstanced objects. The line it breaks at is
Nothing goes wrong up until i raycast, so everything should be instanced and nice.
All help appreciated, thanks.
NxOgre::Ray r;
r.mDirection = mMuzzleOrientation;
r.mOrigin = mMuzzlePosition;
NxOgre::RaycastHit hit = Global::Nx->NxScene->raycastClosestShape(r, NxOgre::Enums::ShapesType_Dynamic);
That's the correct way of doing it afaik. The orientation and position are both NxOgre::Vec3's.Im using VS and im getting NxOgre::PhysXInternalErrorException aswell as NxOgreScene.cpp with lots of uninstanced objects. The line it breaks at is
NxShape* nxShape = mScene->raycastClosestShape(inRay, NxShapesType(int(type)), hit, group, maxDistance, hintFlags, 0, cache);
Nothing goes wrong up until i raycast, so everything should be instanced and nice.
All help appreciated, thanks.