Legacy Documentation: Version 5.5
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

GL.modelview

public static Matrix4x4 modelview;

Description

The current modelview matrix.

Assigning to this variable is equivalent to glLoadMatrix(mat) in OpenGL; in other graphics APIs the corresponding functionality is emulated.

Changing modelview matrix overrides current camera's view parameters, so most often you want to save and restore matrix using GL.PushMatrix and GL.PopMatrix.

Reading this variable returns the current modelview matrix.