EnableFirstPersonCamera

From Onset Developer Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
EnableFirstPersonCamera

Type: Function
Context: Client
Introduced: v1.0

Description

Switches the player camera between 1st and 3rd person.

Syntax

EnableFirstPersonCamera(bEnable)

Parameters

  • bEnable
    true to enable, false to disable.

Return Value

  • Returns true on success.

Example

local bFirstPerson = false
function OnKeyPress(key)
	if key == "P" then
		bFirstPerson = not bFirstPerson
		EnableFirstPersonCamera(bFirstPerson)
	end
end
AddEvent("OnKeyPress", OnKeyPress)

See also

IsFirstPersonCamera