Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: mousepicking crash - C++  (Read 1186 times)
zaky
Community Member
*
Posts: 28


« on: December 28, 2006, 03:20:00 PM »

Code:


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..
Logged
KamiGazz
Community Member
*
Posts: 86


« Reply #1 on: December 29, 2006, 02:13:20 AM »

I face the same problem....

I use MSVC++ 6.0 and TV3D 6.2

I first directly used the TVCollisionResult.GetCollidedMEsh() method so then I tought that my crash came from the fact that I haven't verified if a collision really occured.

But when I added the .isCollision() method to my code, this method crashed too....
I have to admit that I'm a little confused now...

Any advice would be really appreciated...

Regards
Logged
zaky
Community Member
*
Posts: 28


« Reply #2 on: December 29, 2006, 08:08:34 AM »

any suggestions from developers?
it kinda holds me back with my mini-project here Smiley



edit:

sorry, didn't see there is another post on the same issue, anyway if i use class
TrueVision3D::_TVCollisionResultPtr
it seems to work.
Logged
KamiGazz
Community Member
*
Posts: 86


« Reply #3 on: January 04, 2007, 01:01:37 PM »

Hi Zaky,
  when you change your pointer for TrueVision3D::_TVCollisionResultPtr, you did not have any problem with some stuff that are not released when you application close?

I have that crash since I added the mousepicking routine to my program and I just can't find the solution.

The tv3d debug.txt file stops after the texture loading so it doesn't give me any infos and if I run my program step by step, the problem seems to be somewhere around m_pInterface->release(); in the comip.h file.

Any clue anyone?

Regards
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks