Camera::setActive: Difference between revisions
MrPancakers (talk | contribs) mNo edit summary |
MrPancakers (talk | contribs) mNo edit summary |
||
| Line 15: | Line 15: | ||
Creates a camera with the stated positions and rendering it. | Creates a camera with the stated positions and rendering it. | ||
<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;"> | |||
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div> | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
let cam = mp.cameras.new('default', new mp.Vector3(0,0,0), new mp.Vector3(0,0,0), false); | let cam = mp.cameras.new('default', new mp.Vector3(0,0,0), new mp.Vector3(0,0,0), false); | ||
| Line 20: | Line 22: | ||
mp.game.cam.renderScriptCams(true, false, 0, true, false); | mp.game.cam.renderScriptCams(true, false, 0, true, false); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</div> | |||
==See also== | ==See also== | ||
{{Camera_definition_c}} | {{Camera_definition_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Revision as of 22:56, 15 June 2018
Description
Set camera as active/inactive.
Syntax
camera.setActive(active);
Required Arguments
- active: Boolean
Return value
- Undefined
Example
Creates a camera with the stated positions and rendering it.
Client-Side
let cam = mp.cameras.new('default', new mp.Vector3(0,0,0), new mp.Vector3(0,0,0), false);
cam.setActive(true);
mp.game.cam.renderScriptCams(true, false, 0, true, false);
See also
- Functions:
- Camera::Camera
- Camera.animatedShake
- Camera.attachTo
- Camera.attachToPedBone
- Camera.destroy
- Camera.detach
- Camera.doesExist
- Camera.getAnimCurrentPhase
- Camera.getCoord
- Camera.getDirection
- Camera.getFarClip
- Camera.getFarDof
- Camera.getFov
- Camera.getNearClip
- Camera.getRot
- Camera.getSplinePhase
- Camera.isActive
- Camera.isInterpolating
- Camera.isPlayingAnim
- Camera.isRendering
- Camera.isShaking
- Camera.playAnim
- Camera.pointAt
- Camera.pointAtCoord
- Camera.pointAtPedBone
- Camera.setActive
- Camera.setActiveWithInterp
- Camera.setAffectsAiming
- Camera.setAnimCurrentPhase
- Camera.setCoord
- Camera.setDebugName
- Camera.setDofFnumberOfLens
- Camera.setDofFocusDistanceBias
- Camera.setDofMaxNearInFocusDistance
- Camera.setDofMaxNearInFocusDistanceBlendLevel
- Camera.setDofPlanes
- Camera.setDofStrength
- Camera.setFarClip
- Camera.setFarDof
- Camera.setFov
- Camera.setInheritRollVehicle
- Camera.setMotionBlurStrength
- Camera.setNearClip
- Camera.setNearDof
- Camera.setParams
- Camera.setRot
- Camera.setShakeAmplitude
- Camera.setUseShallowDofMode
- Camera.shake
- Camera.stopPointing
- Camera.stopShaking
- Camera.setDofParam
- Camera.getDofParam
- Properties: