Scripting/Client/Functions/GetCameraAngle
The heading in degrees (the same convention as Player.Angle: forward is (-sin a, cos a)) the active game camera looks along - lets a script move the player where the mouse points, for example while swimming. null when it is not available.
Syntax
GetCameraAngle()Returns
float|null
Example
function onScriptLoad()
{
local result = GetCameraAngle();
MessagePlayer( "GetCameraAngle returned: " + result, player );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- GetScreenWidth
- WorldPosToScreen
- ScreenPosToWorld
- GetGroundZLevel
- GetGroundZLevelForPos
- GetGroundZLevelForPosLoad
- Draw3DText
- Draw3DSprite
- Draw3DTextWorld
- Draw3DSpriteWorld
- SetCameraMatrix
- SetCameraTarget
Section: Screen, world and camera
Categories: Client functions | Screen, world and camera