Author Topic: Turreting woes: side-mounted multipart turrets don't visually track targets  (Read 1886 times)

0 Members and 1 Guest are viewing this topic.

Turreting woes: side-mounted multipart turrets don't visually track targets
I have had nothing but trouble getting these damn turrets to work. They're supposed to rotate around the X-axis, but what actually happens is they just kinda... sit there in some completely wrong orientation, while still firing, and I'm officially out of ideas. POF link. The problematic turrets are Turret06 and Turret07 (and yes, I know the subobjects are a little messy). There's nothing fancy in the ship table, but here's the relevant part anyway:



Code: [Select]
$Subsystem:               Turret06, 15, 1.0
   $Default PBanks:         ( "Tractor Beam" )
   $Flags:                  ( "no aggregate" "check hull" "reset when idle" )
$Subsystem:               Turret07, 15, 1.0
   $Default PBanks:         ( "Tractor Beam" )
   $Flags:                  ( "no aggregate" "check hull" "reset when idle" )

 

Offline Axem

  • 211
Re: Turreting woes: side-mounted multipart turrets don't visually track targets
Turret06 and 07 appear to be docking point-like models within the geometry of detail0, is that intentional or is there something else?

 
Re: Turreting woes: side-mounted multipart turrets don't visually track targets
Ah, yeah, let me explain that. My understanding (and this could be what's giving me problems to begin with) is that, to get the turrets to rotate, they need to be multi-part turrets with a "base" and "arm" subobject. The docking point model (which really should be a nontextured triangle, but I digress) is the base and the side pods are the arm.

Now that I've typed that out, I suddenly doubt that this particular hack is correct. >_>

  

Offline Axem

  • 211
Re: Turreting woes: side-mounted multipart turrets don't visually track targets
Oh! Gotcha... I get what you're up to now... but I don't think that's going to work...

What's the ultimate goal here? Is the AI going to be using the tractor beams in a free manner in a battle or is this just to look really cool while it does one thing.

 
Re: Turreting woes: side-mounted multipart turrets don't visually track targets
****.

The situations when the tractor beam is used are tightly controlled by a script, but it does need to be able to rotate freely around the X-axis. That's why I thought of turrets. Is there another way to rotate a subobject to an arbitrary (at runtime) angle?



EDIT: To put it another way, the goal is a scripting function, SetTractorBeamTarget(ship, target), that causes the ship to emit a tractor beam from its tractor beam subobjects, and to bank and rotate those subobjects to keep target in the beam, until another call to SetTractorBeamTarget with the same ship argument. Putting the tractor beam at a fixed orientation and rotating the entire ship isn't an option, because the ship needs to maneuver normally, too.
« Last Edit: February 13, 2017, 06:03:17 pm by xenocartographer »

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Turreting woes: side-mounted multipart turrets don't visually track targets
I don't know if setting the rotation axis in PCS2 causes a problem, but at least it's unnecessary (at least when you're using fvec/uvec). In any case, chances are no one can tell you why something really weird and bizarre like that isn't working. You should make something that works, first. Like, maybe normal turrets with simply limited barrel elevations, not a 359 degree fov axle thing with gunpoints above and below the horizon and the turret base in the middle of the ship mesh with the "check hull" flag on.

 
Re: Turreting woes: side-mounted multipart turrets don't visually track targets
I played around with ordinary turrets first.

 

Offline Nyctaeus

  • The Slavic Engineer
  • 212
  • My "FS Ships" folder is 582gb.
    • Minecraft
    • Exile
Re: Turreting woes: side-mounted multipart turrets don't visually track targets
That's one of the weirdest things I've ever seen. It would work, but you have to completly block X and Y axis to prevent turrets from rotating. Geometry of the eng... Of the amrs should force them to rotate only in Z. You can probably do it via limiting firing angle if it's even possible, but engine is gonna have serious problem with target targetting.

Seriously, drop this idea. I get what you are pointing at and it would look cool, but it's probably not possible.
Exile | Shadow Genesis | Inferno | Series Resurrecta  | DA Profile | P3D Profile

Proud owner of NyctiShipyards. Remember - Nyx will fix it!

All of my assets including models, textures, skyboxes, effects may be used under standard CC BY-NC 4.0 license.

 
Re: Turreting woes: side-mounted multipart turrets don't visually track targets
I was able to engineer a scripted solution. Thanks to Axem for getting me off the wrong track :)