Collision problems with tank pack.
by Chris Kuykendall · in Torque Game Engine Advanced · 10/30/2005 (3:50 pm) · 12 replies
After having finally gotten around to experimenting with the tank pack I have hit a nasty snag, while starting a game being a tank by default works OK, starting as a player and then trying to mount the tank or even just shooting the tank causes a complete game crash, the console log shows nothing in referenceto this problem, so I really have no idea how to fix this. Any ideas or directions to point me in?
#2
11/01/2005 (10:48 am)
Search for a post about a month old on it. I think a solution is in that post. It was called Tank pack in TSE I think.
#3
@Randy: I used the changes in that post to get the tank pack into TSE, but I haven't had time to really start working with it until now (real life and all that...), I went back through those changes again, even recompiled, I can get the tank to spawn and appear in an atlas terrain, but any other contact with it, whether touching or shooting crashes the game with the above access violation. Any Ideas?
11/01/2005 (2:56 pm)
@ Josh: this is the information that VC++6 gives me: unhandled exception in tse.exe: 0xC0000005: Access Violation, and the arrow in the disassembly window pointing at 006a9afe ???: Any ideas what this means@Randy: I used the changes in that post to get the tank pack into TSE, but I haven't had time to really start working with it until now (real life and all that...), I went back through those changes again, even recompiled, I can get the tank to spawn and appear in an atlas terrain, but any other contact with it, whether touching or shooting crashes the game with the above access violation. Any Ideas?
#4
11/24/2005 (6:53 am)
Copy and paste the contents of tsCollision.cc into the tsCollision.cpp file, or or you could prolly use windiff.
#5
11/24/2005 (9:29 am)
@Chris - if you run a debug build it should show you an actual line in the source code... Hopefully. ;)
#6
on to something else.
11/24/2005 (11:55 am)
Now that I think of it. My guy crashes when trying to mount too. LOL I just stoppped testing tank pack and movedon to something else.
#7
The source extensions are different in TSE, and there is already a tsCollision.cpp included in TSE. If you add the tsCollision.cc file to the project you will get link errors (D'oh, I did that too....).
Look at line 165 in TSE's tsCollision.cpp file, I think thats where it was hanging.
// different node from before, set up for this node
previousMat = mesh->getTransform();
mat = *previousMat; // This is the line.
mat.inverse();
mat.mulP(a,&ta);
mat.mulP(b,&tb);
11/24/2005 (3:51 pm)
It crashes on a line to do with nodes?, I forget which, but I had the same problem untill I compared the two files and figured out I was missing something (Intelligence, I think, but it was a 3am moment).The source extensions are different in TSE, and there is already a tsCollision.cpp included in TSE. If you add the tsCollision.cc file to the project you will get link errors (D'oh, I did that too....).
Look at line 165 in TSE's tsCollision.cpp file, I think thats where it was hanging.
// different node from before, set up for this node
previousMat = mesh->getTransform();
mat = *previousMat; // This is the line.
mat.inverse();
mat.mulP(a,&ta);
mat.mulP(b,&tb);
#8
11/24/2005 (4:39 pm)
Is something NULL? What do the local variables look like? What's the callstack?
#9
Ummm, I think one of the mats was null..... Don't quote me on that though......
11/24/2005 (4:54 pm)
Ah, sorry, I didnt really stop to look, once I figured there were diferences in the Bravetree file, I just copied them over, and it worked. I did it with a fresh CVS copy, so it should be easily reproducable. I'm using Visual C++ 2003 Architects Ed, patched. WinXP Pro, GeForce TI4200 and MX440, latest DirectX libs. Note I'm not using a Shader card... :-(Ummm, I think one of the mats was null..... Don't quote me on that though......
#10
11/24/2005 (4:56 pm)
Ah, ok, great. If it's working then I've no desire to know what went wrong. :)
#11
11/24/2005 (6:57 pm)
Awesome, I'm seeing a couple of if statements that aren't in the original tsCollision, I'll try adding the tank pack back in this weekend, thanks guys.
#12
11/26/2005 (6:38 am)
Woohoo, I got it working, thanks guys, now has anyone gotten the tank pack to work with the torque vehicle resource? I tried adding a |$Typemasks::TankShapeObjectType to thecommands.cs but I get a log message saying no object found, did I miss something?
Torque Owner Josh Moore