Roller25 Posted August 14, 2019 Posted August 14, 2019 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)?
Merlins51 Posted August 15, 2019 Posted August 15, 2019 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
Roller25 Posted August 15, 2019 Author Posted August 15, 2019 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!
Razi Posted August 15, 2019 Posted August 15, 2019 Thanks for the weight on wheels solution! Been trying to find something like this.
Recommended Posts