Jump to content

Recommended Posts

Posted

 

Also I think I have the gun angle settings all jacked up.  Again, more explanation from ChatGPT... any old-salts around here can jump in an correct if something is incorrect, but I found it useful...

 

🔧 GT.WS[2].reference_angle_Y = math.rad(150)

✅ What It Does

This line defines the default yaw orientation (left/right direction) of the weapon station (in this case, WS[2]) relative to the model’s forward axis.

In simpler terms:

  • It tells DCS:
    “This gun should face 150 degrees to the right from the building’s forward direction.”


🧭 How the Angle Works

DCS uses a clockwise angle system based on degrees from front (0°):

  • reference_angle_Y = math.rad(0) → faces forward

  • reference_angle_Y = math.rad(90) → faces right

  • reference_angle_Y = math.rad(180) → faces backward

  • reference_angle_Y = math.rad(270) → faces left (or -90°)

So:

GT.WS[2].reference_angle_Y = math.rad(150)

Means:

  • The gun on WS[2] is angled slightly to the right of rear — facing between right-rear and rear

  • Useful if your gun is placed on the rear-left corner of a building and should cover the rear-right approach

 

 

✅ Related Properties You Should Know

🔄 angles = {{ left_limit, right_limit, down_limit, up_limit }}

This defines the arc of movement for the weapon station.

Example:

angles = {
    {math.rad(120), math.rad(180), math.rad(-10), math.rad(30)}
}

  • Can move between 120° and 180° in yaw

  • Can elevate from -10° (down) to +30° (up)

⬅️➡️ maxLeft and maxRight

These are soft yaw constraints for aiming AI.

🎯 Combined Use

For a rear-facing MG:

GT.WS[2].reference_angle_Y = math.rad(180)  -- gun faces rear
GT.WS[2].angles = {
    {math.rad(135), math.rad(225), math.rad(-10), math.rad(30)}  -- covers rear arc
}

  • Thanks 1

[sIGPIC]sigpic65507_1.gif[/sIGPIC]

Posted

Another key point.  The left and right thing obviously depends on point of view.  So imagine you are IN the house looking out the front door. 

I had been doing it wrong, thinking I was looking at, or facing the object.

 

The Z-axis value (left/right offset) is:

  • Positive (+Z) → Right from the object's own point of view

  • Negative (−Z) → Left from the object's own point of view

[sIGPIC]sigpic65507_1.gif[/sIGPIC]

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...