15 const float FOV = 0.5236;
30 if( FreeDebugCamera.GetInstance().IsActive() )
40 m_Character =
PlayerBase.Cast(
GetGame().CreateObject(
"SurvivorF_Judy", FreeDebugCamera.GetInstance().GetPosition(),
false,
false) );
42 FreeDebugCamera.GetInstance().SetFOV(FOV);
49 if(!FreeDebugCamera.GetInstance().IsActive())
return;
50 if(!m_Character)
return;
51 m_camera_orientation = FreeDebugCamera.GetInstance().GetOrientation();
52 m_camera_orientation[1] = 1;
53 FreeDebugCamera.GetInstance().SetOrientation(m_camera_orientation);
54 m_cam_pos = FreeDebugCamera.GetInstance().GetPosition();
55 m_character_pos = m_Character.GetPosition();
56 m_camera_dir = FreeDebugCamera.GetInstance().GetDirection();
61 m_Character.SetOrientation(m_demoRot);
66 FreeDebugCamera.GetInstance().SetFOV(
g_Game.GetUserFOV());
71 vector cam_pos = FreeDebugCamera.GetInstance().GetPosition();
74 m_cameraTrans[3] = cam_pos;
protected bool m_Initialized
proto native float SurfaceY(float x, float z)
void Log(string msg, string label)
PluginDeveloper m_ModuleDeveloper
vector m_camera_orientation
override void OnDestroy()
override void OnUpdate(float delta_time)
proto float Normalize()
Normalizes vector. Returns length.
proto string ToString(bool beautify=true)
Vector to string.
proto vector Multiply4(vector mat[4])
Transforms position.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto void DirectionAndUpMatrix(vector dir, vector up, out vector mat[4])
Creates rotation matrix from direction and up vector.
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
static proto float Atan2(float y, float x)
Returns angle in radians from tangent.
static const float RAD2DEG