Looking at the code of Lambda, this can be directly ported from lambda to lua.
// Relative horizontal locak
float relhor = CAM::GET_GAMEPLAY_CAM_RELATIVE_HEADING();
//Relative vertical lock
float relvert = CAM::GET_GAMEPLAY_CAM_RELATIVE_PITCH();
If we would convert to Lua it would look something like this:"
local lockHorizontal = false
local lockVertical = false
while true do
if lockHorizontal then
local heading = GetGameplayCamRelativeHeading()
if lockVertical then
local pitch = GetGameplayCamRelativePitch()
Up to you on how to set the “lockVertical” and “lockHorizontal” variables, set to true will cause the desired axis to be locked.
The code was writting without being tested, may have some errors*