Home   Help Search Login Register  

Author Topic: detect direction unit is aiming versus direction unit is facing  (Read 1006 times)

0 Members and 1 Guest are viewing this topic.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Greetings.

When a player is facing one direction, he can adjust his aim left/right 10 or 20 degrees before his body changes direction.

GETDIR tells us the direction the unit's body is facing.  Is there a way to detect the exact direction the unit is aiming?

Maybe by detecting the direction of the "internal view" camera of a unit?

Please advise.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline CrazyAce

  • Members
  • *
This for AI or human? I thought that AI doesn't have floating camera.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
You can use the weaponDirection command to find out where the gun is pointing (float zone and all), however it can't be used when the unit isn't sporting a weapon (i.e., unarmed). Alternatively, this little function by Spooner might be the very thing you're looking for  :cool2:

Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
weaponDirection works perfect. Thanks a million Wolf!

I guess this wasn't such an advanced question after all...since a command exists for it... :-[
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Quote
I guess this wasn't such an advanced question after all
:whistle:

Moved.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.