MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/FleX / UpdateCamera

Function UpdateCamera

demo/main.cpp:1095–1102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1093}
1094
1095void UpdateCamera()
1096{
1097 Vec3 forward(-sinf(g_camAngle.x)*cosf(g_camAngle.y), sinf(g_camAngle.y), -cosf(g_camAngle.x)*cosf(g_camAngle.y));
1098 Vec3 right(Normalize(Cross(forward, Vec3(0.0f, 1.0f, 0.0f))));
1099
1100 g_camSmoothVel = Lerp(g_camSmoothVel, g_camVel, 0.1f);
1101 g_camPos += (forward*g_camSmoothVel.z + right*g_camSmoothVel.x + Cross(right, forward)*g_camSmoothVel.y);
1102}
1103
1104void UpdateMouse()
1105{

Callers 1

UpdateFrameFunction · 0.85

Calls 3

NormalizeFunction · 0.50
CrossFunction · 0.50
LerpFunction · 0.50

Tested by

no test coverage detected