Home   Help Search Login Register  

Author Topic: Can I call the bearing of a turret?  (Read 535 times)

0 Members and 1 Guest are viewing this topic.

Offline shinraiden

  • Members
  • *
  • kiite, mite, katta
Can I call the bearing of a turret?
« on: 05 Jul 2003, 04:28:39 »
Using getdir I can get the heading of man of a vehicle, but is it possible to get the heading of the primary turret?

I suppose it's too much to ask for the heading of the commander's turret :'(, since that appears related to the one-turret only limit.

Thanks.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Can I call the bearing of a turret?
« Reply #1 on: 05 Jul 2003, 16:24:19 »
The short answer: no :(

The longer answer -- a while ago, prospero pointed out you could find pitch and bank information by comparing various points on the vehicle and doing some trig transformations.

Basically, you get the vehicle's position, then you read the position of say the driver.  You can use those points plus the other info (getdir of the vehicle) to figure out the orientation of the vehicle.  Then, if the turret is off-axis, you might be able to getpos the guy in the turret, and figure out which way it's pointing.
But I doubt it'll work
Dinger/Cfit