Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Tools => Topic started by: Scooby_Doo on March 24, 2013, 01:28:27 am

Title: OpenCollada and incorrect turret angles
Post by: Scooby_Doo on March 24, 2013, 01:28:27 am
With the newest OpenCollada (1.4.0) any turret that has an off angle (not 0,90,180,270) on the front/back axises is flipped.  I.e. (0,35,0) becomes (0,-35,0).

Looking into the dae file here's a sample for turret 31 (0,35,0)
Code: [Select]
<node id="node-turret31" name="turret31">
          <translate>153.3613 483.8815 26.96726</translate>
          <rotate>0 -1 0 -34.99999</rotate>

shouldn't 0,-1,0 * -35 = 0,35,0?

turret 32 (0,-35,0) has
<rotate>0 1 0 -34.99999</rotate>
Title: Re: OpenCollada and incorrect turret angles
Post by: Scooby_Doo on March 24, 2013, 10:24:22 pm
Some more testing...

I have a sideways turret (0,90,0) this exports to [0,-1,0, -90] = [0,90,0].  This is correct in max and in pcs2.
Then I set the turret to (0,85,0) this exports to [0,-1,0,-85] = [0,85,0].  This is correct in max, but not in Pcs

I'm wondering if it's because I have to mirror the model in the X & Z axis in pcs2  :confused:
Title: Re: OpenCollada and incorrect turret angles
Post by: Scooby_Doo on March 26, 2013, 07:12:34 pm
Oh I just noticed it's not just the turrets, it can be any subobject, although only turrets are seriously effected (everything else can be xform reset)
Title: Re: OpenCollada and incorrect turret angles
Post by: Spicious on March 29, 2013, 03:27:44 am
Try this (https://googledrive.com/host/0B_qLK7VGhoIydUY1RFlzOVNMdGc/pcs2.7z).
Title: Re: OpenCollada and incorrect turret angles
Post by: Scooby_Doo on March 29, 2013, 04:26:44 am
Looks good!  :yes:

What did you have to fix?
Title: Re: OpenCollada and incorrect turret angles
Post by: Spicious on March 29, 2013, 07:02:08 am
Extra minus sign.