ITVEngine pEngine;
ITVInputEngine pInput;
ITVScene pScene;
ITVLandscape pLand;
ITVTextureFactory pTex;
ITVGlobals pGlobals;
ITVCamera pCam;
ITVCollisionResult ColRes;
...
LOTS OF STUFF...
...
ColRes = CreateTVCollisionResult();
...
LOTS OF STUFF...
...
if ( pInput->IsKeyPressed ( TV_KEY_F ) )
{
ColRes = pScene->MousePicking(MouseAX, MouseAY, (CONST_TV_OBJECT_TYPE) (TV_COLLIDE_TERRAIN + TV_COLLIDE_ACTOR2), TV_TESTTYPE_ACCURATETESTING );
if (ColRes->GetCollisionObjectType() == TV_COLLIDE_ACTOR2)
MessageBox(NULL, "boom", "", 0);
}
When i press f it shows the "so far so good" message, then shows a windows access violation blablabla error thing and quits.
IsCollision() or any Get...() function does the same..