Jump to content

Recommended Posts

Posted

Hey guys. I'm wanting to have ground effects for my motion sim for land (<2m AGL) and also the same ground effects for on the carrier (which is around 21m ASL)... Is there something I can use in lua which defines an aircraft being over land or over water (sea)?

Posted

Not sure what you mean by "Ground effects". Can you use Weight on Wheels instead? If so, the following Lua in your Export.lua should allow you to adjust intensity of motion when on the ground:

(In this example it multiplies the forces by 2).

 

 

 

local accel = LoGetAccelerationUnits()

 

--Weight On Wheels

local LeftGear = LoGetAircraftDrawArgumentValue(6)

local NoseGear = LoGetAircraftDrawArgumentValue(1)

local RightGear = LoGetAircraftDrawArgumentValue(4)

 

local WOW = 0 --WOW = Weight On Wheels

if (LeftGear > 0 or NoseGear > 0 or RightGear > 0)

then

WOW = 1

else

WOW = 0

end

 

--change exported values when on ground

if (WOW == 1) then

accel.x = accel.x * 2.00

accel.y = accel.y * 2.00

accel.z = accel.z * 2.00

end

Posted
Not sure what you mean by "Ground effects". Can you use Weight on Wheels instead? If so, the following Lua in your Export.lua should allow you to adjust intensity of motion when on the ground:

(In this example it multiplies the forces by 2).

 

 

 

local accel = LoGetAccelerationUnits()

 

--Weight On Wheels

local LeftGear = LoGetAircraftDrawArgumentValue(6)

local NoseGear = LoGetAircraftDrawArgumentValue(1)

local RightGear = LoGetAircraftDrawArgumentValue(4)

 

local WOW = 0 --WOW = Weight On Wheels

if (LeftGear > 0 or NoseGear > 0 or RightGear > 0)

then

WOW = 1

else

WOW = 0

end

 

--change exported values when on ground

if (WOW == 1) then

accel.x = accel.x * 2.00

accel.y = accel.y * 2.00

accel.z = accel.z * 2.00

end

 

Perfect! That'll do the trick! Thank you!

  • Recently Browsing   0 members

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