The old return value of GetCameraState was a numerically indexed table with the position and some other info.
The new return value is a table with string indices (dx, dy, dz, flipped, height, mode, name, px, py, pz, zscale).
So if you just want to go to a unit:
Code: Select all
local currentCamState = Spring.GetCameraState()
local x, y, z = Spring.GetUnitPosition(yourUnitIDHere)
currentCamState.px = x
currentCamState.pz = z
Spring.SetCameraState(currentCamState, 1)