Game Development Community

Collada Weapons not showing...

by Bobby Leighton · in Torque 3D Professional · 06/02/2010 (7:17 pm) · 6 replies

I can get my model in the game through a simple load, I can get it registered with engine as a "weapon", and it will drop in the engine as a "weapon" and spin like they are supposed to but it wont show in the player hands even though it is there and you can shoot with it. has anyone else run into this problem?

Edit: I also tried using the shapename.cached.dts model with the same effect, i don't remember having this problem in the earlier beta perhaps Ill try the last build of T3D...

#1
06/02/2010 (8:29 pm)
Alright its the shape I am using, I exported a simple box and that worked first....so I guess I gotta fix my model for some reason, just odd that the engine would accept it, but not mount it in this case, is there a poly limit to mounted object once mounted?
#2
06/02/2010 (11:18 pm)
So the shape is visible in game, but when you mount it to the player it disappears? Weird.

Is it invisible in both 1st and 3rd person? Could be a problem with the shape bounds?

There's no poly limit for mounted shapes. Does the mounted shape have a 'mountPoint' node? If so, that node will end up attached to the player's 'mountX' node. If not, the shape origin will be used.
#3
06/03/2010 (8:18 pm)
Yeah i tied it with mountpoint, and muzzlepoint...then i tried just a box and it worked, so it was just the shape for some reason...not sure why but i got another model and it works great:O)
#4
06/04/2010 (12:02 am)
Maybe the shape is inside the player model. You can correct this in the your_weapon.cs file.

datablock ShapeBaseImageData(your_weapon)
{
   // Basic Item properties
   shapeFile = "art/shapes/your_weapon/your_weapon.dts";
   emap = true;

   // Specify mount point & offset for 3rd person
   // Change eyeOffset to "0 0 0" for 1st person
   mountPoint = 0;
   //offset = "0 0 0"
   //eyeOffset = "0.1 0.4 -0.6";

With mountpoint, offset (1st person) and eyeOffset (3rd person) you can tweak the position of your weapon. Take a look at the stock weapon.cs in the art/datablock/weapons folder.
#5
06/11/2010 (11:52 am)
Nope it was a invalid COLLADA shape, i have had the problem with 3 different models, one was a model with sub-models where some showed and some did not, but fixing some of the way the objects were assembled fixed that problem:O)
#6
06/11/2010 (6:08 pm)
Sounds like you worked around the issue, but just in case you have issues again... You mentioned that the same model appeared correctly as an item (unless I misunderstood that bit), so I figured it's worth suggesting you may have some missing detail meshes if you're using LOD. Might want to check it out in the in-game shape editor so you can manually test every LOD.

Also as Chris briefly mentioned make sure the model "bounds" mesh (regardless of whatever the in-game bounding box looks like) covers the whole thing, otherwise it might vanish when only part of it is visible in the close-up first person view and it technically goes out of rendering scope.