setThirdPersonCamOrbitDistanceLimitsThisUpdate
SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE0xDF2E1F7742402E81The GTA V native SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE of the CAM namespace, as LS:MP client scripts call it: the global function setThirdPersonCamOrbitDistanceLimitsThisUpdate, in JavaScript and in Lua.
setThirdPersonCamOrbitDistanceLimitsThisUpdate(
p0: number,
distance: number
): voidsetThirdPersonCamOrbitDistanceLimitsThisUpdate(p0: number, distance: number)Usage
JavaScript
setThirdPersonCamOrbitDistanceLimitsThisUpdate(p0, distance);Lua
setThirdPersonCamOrbitDistanceLimitsThisUpdate(p0, distance)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
p0 | float | number | number |
distance | float | number | number |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Seems to animate the gameplay camera zoom.
Eg. setThirdPersonCamOrbitDistanceLimitsThisUpdate(1f, 1000f);will animate the camera zooming in from 1000 meters away.
Game scripts use it like this:
// Setting this to 1 prevents V key from changing zoom
setPlayerForcedZoom(playerId(), 1);
// These restrict how far you can move cam up/down left/right
setThirdPersonCamRelativeHeadingLimitsThisUpdate(-20f, 50f);
setThirdPersonCamRelativePitchLimitsThisUpdate(-60f, 0f);
setThirdPersonCamOrbitDistanceLimitsThisUpdate(1f, 1f);Reference
- Namespace
- Camera CAM
- In the game
void SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE(float p0, float distance)- Hash
0xDF2E1F7742402E81- Formerly
_ANIMATE_GAMEPLAY_CAM_ZOOM