294 {
295 vector y_p_r;
296
298 {
300 vector mat0[3];
301 vector mat1[3];
302 vector mat2[3];
303 vector projection_position =
m_Projection.GetPosition();
304 vector normal;
305
307 {
309 }
310 else
311 {
313 }
314
316 angles[1] = angles[1] + 270;
317
318 angles[0] = Math.Clamp( angles[0], 0, 360 );
319 angles[1] = Math.Clamp( angles[1], 0, 360 );
320 angles[2] = Math.Clamp( angles[2], 0, 360 );
321
322 projection_orientation_angles[0] = projection_orientation_angles[0] + ( 360 - angles[0] );
323
324 Math3D.YawPitchRollMatrix( projection_orientation_angles, mat0 );
325 Math3D.YawPitchRollMatrix( angles, mat1 );
326 Math3D.MatrixMultiply3( mat1, mat0, mat2 );
327
328 y_p_r = Math3D.MatrixToAngles( mat2 );
329 }
330 else
331 {
333
334 if ( y_p_r[0] > 180 )
335 {
336 y_p_r[0] = y_p_r[0] - 360;
337 }
338
339 if ( y_p_r[0] < -180 )
340 {
341 y_p_r[0] = y_p_r[0] + 360;
342 }
343 }
344
346 }
proto native vector SurfaceGetNormal(float x, float z)
vector SmoothProjectionMovement(vector y_p_r, float timeslice)
vector GetProjectionRotation()
vector GetDefaultOrientation()
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
proto native CGame GetGame()