moveScriptCamera
Client-side
Move the camera between two world positions over a chosen duration, linearly or with GTA's original easing.
Syntax
bool moveScriptCamera(int token, Vector3 from, Vector3 to, int durationMs [, bool ease = true])Arguments
tokenintCurrent lease token.
fromVector3Start position.
toVector3End position.
durationMsintPositive duration in milliseconds.
easebooloptional · default trueUse GTA's eased track instead of linear motion.
Returns
true when the track started; false for stale ownership or invalid vectors/duration.
Ownership and lifecycle
Only one resource can own the global script camera. San Andreas Online rejects stale callbacks and releases ownership on stop, restart, disconnect, or an authoritative server camera RPC.
Where this comes from
SOURCECLuaCameraDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaCameraDefs.cpp INTRODUCED / EXTENDED8cf6cc3cbRead the commit and why the change was made RELATED CATEGORY HARNESS native-script-camera-test Category-level coverage · test-resources/native-script-camera-test
RELATED SA:O APIS
Read the system guide → Continue exploring
← Back to the SA:O Lua API · How Native script camera works →