Game Development Community

Sideways weapons?

by Timothy Castagna · in Artist Corner · 10/25/2007 (7:00 am) · 7 replies

Hey Guys,
i'm pretty new here, just started getting into this stuff, i created a handgun model using max9 but when i export it and put it into torque it comes out laying on its side instead of upright like it is in max. Any ideas? ill post of screen shots of it when i get home tonite. Thanks.

#1
10/26/2007 (5:18 am)
Your Pivot point is rotated on your bounding box, or your mesh object. You can adjust the mounting transform via the weapon[script] datablock; otherwise, you'll have to change your art asset and re-export the shape to dts. Read up on DTS format requirements and tutorials in the TDN. I'm sure there is a 'Max' version to show a successful export.
#2
10/26/2007 (1:07 pm)
Can you give me a little more detail on how to fix it on the art side..
#3
10/29/2007 (1:18 pm)
A little update...i got the model rotated and it looks fine in 3rd person (upright and pointing foward) but when your in first person the model is pointing to the right (upright still). basically i copied the crossbow.cs file and changed the names to work for my handgun model, is there something in there that rotates the model in first person cause i didn't see anything that did. any ideas?
#4
10/29/2007 (1:41 pm)
That's just the way your model is made, in the datablock for the weapon look around for
datablock ShapeBaseImageData(YourWeapon)
{
   // Basic Item properties
   shapeFile = "~/data/shapes/yourWeapon/yourWeapon.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   eyeOffset = "0.1 0.4 -0.6";

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off.  
   correctMuzzleVector = false;
};

Depending on how you build your model, you should try tinkering with eyeOffset, and correctMuzzleVector. Hope that helps!
#5
10/29/2007 (2:43 pm)
The eye offset only moves it left or right, up or down, closer or farther from you, it doesn't rotate the model at all. i dont remember if correctMuzzleVector is on or not. I'll have to check when i get home. Thanks for the suggestion.
#6
10/29/2007 (3:57 pm)
kghnsc_28.kghost.net/files/first.jpg
kghnsc_28.kghost.net/files/third.jpg
see what i mean..any ideas?
#7
10/29/2007 (5:18 pm)
I got it..i tried what Rex said about the pivot point ( the help section is a wonderful thing) and it worked. Thanks for the help guys.