Author Topic: fvec and uvec question  (Read 1708 times)

0 Members and 1 Guest are viewing this topic.

fvec and uvec question
I've been playing around with Wanderer's new build and i've run into a snag... i think this is a pof issue prolly...

On Trashman's archangel model, hes got 8 massive turrets, very reminiscent of an old WW2 battle ship. Wanderer's build allows for setting a base FOV, essentially limiting how far the turret can turn left or right based off the $fvec value in the pof.

What I'm running into is the aft top side turrets need a $fvec of 0,0,-1 to make the base's front side face aft so that the Base FOV value is based at 180 deg relative to the ship instead of 0 like the forward turrets. That works except the barrels don't go with it... instead they stay in place attached to the back side of the turret instead of the front.

If i set the fvec to 0,0,1 the barrels are in the proper place but 0,0,1 is 0 degrees relative to the ship so the Base FOV value doesn't work for the model (the turrets will shoot at stuff thats in front of the ship, through the super structure)

here's the table entry for one of the top side aft turrets

Code: [Select]

$Subsystem: Turret05a, 5.0, 3.0
$Default PBanks: ( "Heavy Ion Cannon" "Heavy Ion Cannon" )
$Maximum Barrel Elevation: 80
$Turret Base FOV: 320
$Flags: ( "use multiple guns" "fire on target" "reset when idle" )
$animation: triggered
$type: initial
+relative_angle: 90,180,0


So essentially with $Fvec:0,0,-1 and $Turret Base FOV: 320, the turret has a horizontal firing arc between 20 and 340 degrees relative to the ship. anything at a bearing less than 20 degrees and more than 340 degrees (pretty much directly ahead of the ship), the turret won't point at. Thats working right except the barrels are misaligned to the base and i r stuck on that.

BTW the animation code doesn't make a difference with the Base FOV setting. it's purely based off the $Uvec and $Fvec in the .pof


 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: fvec and uvec question
It doesn't quite work like that.  Fvec and uvec are typically used to define turrets that aren't placed on the top or bottom of a ship.  All of the top turrets on the Archangel are facing forward in the model (animation code is used to make them point where they should).  By putting a fvec for those turrets, you are telling the engine that the turret is facing backwards in the model, which it isn't.

 
Re: fvec and uvec question
thats the thing, i *know* that in reality its not facing backwards, but inorder for the Base FOV flag to work, i have to make it face backwards so that the front of the base is facing aft. if i leave it alone, even setting an initial animation, the front of the turret is facing forward so the firing cutout gets reversed.

essentially what i want the aft top side turrets to do is shoot at anything thats between 20 and 340 horizontally and anything between 350 and 80 degrees vertically aft of the ship
« Last Edit: August 19, 2008, 05:59:47 pm by Vertigo 7 »

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: fvec and uvec question
The only real solution is to go back into TrueSpace (you've done this before ;)), and rotate the turret 180 degrees (not sure how this works in TS7).

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: fvec and uvec question
The only real solution is to go back into TrueSpace (you've done this before ;)), and rotate the turret 180 degrees (not sure how this works in TS7).
you go to the model side, select the part you need (hopefully you have the trueview tsx) and enter 180 in the rotation field :p
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 
Re: fvec and uvec question
yeps thats what i just did... took me a while cuz i kept getting array out of bounds when i was saving the cob. detail 4 and 5 had no textures... but... since like i'll never see detail 4 and 5, i deleted it =p

  
Re: fvec and uvec question
now i just gotta move the fire points and all should be good