是否有可能在整个游戏中获得模型的全局位置?
我试图弄清楚这些值的来源。根据我旋转相机的方式,这些值会发生变化。
不同的职位:
从 gDebugger,我得到了这些值:
LOWEST ANGLE:
GL_VIEWPORT: {4, 165, 512, 334}
GL_MODELVIEW_MATRIX:
{0.99975264, 0.0091297952, -0.020280767, 0}
{0, 0.91186345, 0.41049367, 0}
{0.022241013, -0.41039214, 0.9116379, 0}
{1819.2891, -308.66016, 5129.084, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_CURRENT_MATRIX_ARB:
{0.99975264, 0.0091297952, -0.020280767, 0}
{0, 0.91186345, 0.41049367, 0}
{0.022241013, -0.41039214, 0.9116379, 0}
{1819.2891, -308.66016, 5129.084, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_MODELVIEW_MATRIX:
{0.99990994, 0.0055096098, -0.01223895, 0}
{0, 0.91186345, 0.41049367, 0}
{0.013421912, -0.41045669, 0.91178131, 0}
{255.48047, -56.457031, 4179.0703, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_CURRENT_MATRIX_ARB:
{0.99990994, 0.0055096098, -0.01223895, 0}
{0, 0.91186345, 0.41049367, 0}
{0.013421912, -0.41045669, 0.91178131, 0}
{255.48047, -56.457031, 4179.0703, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_MODELVIEW_MATRIX:
{0.99977756, 0.0086575896, -0.019231817, 0}
{0, 0.91186345, 0.41049367, 0}
{0.021090677, -0.41040236, 0.91166061, 0}
{248.38477, -85.074219, 4242.6367, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_CURRENT_MATRIX_ARB:
{0.99977756, 0.0086575896, -0.019231817, 0}
{0, 0.91186345, 0.41049367, 0}
{0.021090677, -0.41040236, 0.91166061, 0}
{248.38477, -85.074219, 4242.6367, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_MODELVIEW_MATRIX:
{0.99966991, -0.010546137, 0.023427004, 0}
{0, 0.91186345, 0.41049367, 0}
{-0.025691351, -0.41035816, 0.91156244, 0}
{223.3418, -60.19043, 4187.3594, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_CURRENT_MATRIX_ARB:
{0.99966991, -0.010546137, 0.023427004, 0}
{0, 0.91186345, 0.41049367, 0}
{-0.025691351, -0.41035816, 0.91156244, 0}
{223.3418, -60.19043, 4187.3594, 1}
HIGHEST:
GL_VIEWPORT: {4, 165, 512, 334}
GL_MODELVIEW_MATRIX:
{0.99966991, -0.010546137, 0.023427004, 0}
{0, 0.91186345, 0.41049367, 0}
{-0.025691351, -0.41035816, 0.91156244, 0}
{223.3418, -60.19043, 4187.3594, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_CURRENT_MATRIX_ARB:
{0.99966991, -0.010546137, 0.023427004, 0}
{0, 0.91186345, 0.41049367, 0}
{-0.025691351, -0.41035816, 0.91156244, 0}
{223.3418, -60.19043, 4187.3594, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_MODELVIEW_MATRIX:
{0.99997616, 0.0060372208, -0.0033470246, 0}
{0, 0.48486927, 0.87458664, 0}
{0.006902942, -0.87456578, 0.48485771, 0}
{3551.2305, 297.58008, 5957.9141, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_CURRENT_MATRIX_ARB:
{0.99997616, 0.0060372208, -0.0033470246, 0}
{0, 0.48486927, 0.87458664, 0}
{0.006902942, -0.87456578, 0.48485771, 0}
{3551.2305, 297.58008, 5957.9141, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_MODELVIEW_MATRIX:
{0.99997616, 0.0027075345, -0.0063497927, 0}
{0, 0.91986758, 0.39222905, 0}
{0.006902942, -0.39221969, 0.91984564, 0}
{-281.65234, -45.993164, 4131.0254, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_CURRENT_MATRIX_ARB:
{0.99997616, 0.0027075345, -0.0063497927, 0}
{0, 0.91986758, 0.39222905, 0}
{0.006902942, -0.39221969, 0.91984564, 0}
{-281.65234, -45.993164, 4131.0254, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_MODELVIEW_MATRIX:
{0.99960816, 0.010978992, -0.02574827, 0}
{0, 0.91986758, 0.39222905, 0}
{0.027991278, -0.39207536, 0.91950715, 0}
{249.30078, -64.625977, 4174.7188, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_CURRENT_MATRIX_ARB:
{0.99960816, 0.010978992, -0.02574827, 0}
{0, 0.91986758, 0.39222905, 0}
{0.027991278, -0.39207536, 0.91950715, 0}
{249.30078, -64.625977, 4174.7188, 1}
GL_CURRENT_MATRIX_ARB:
{0.99992931, -0.004879978, 0.010840298, 0}
{0, 0.91186345, 0.41049367, 0}
{-0.011888071, -0.41046464, 0.91179901, 0}
{-287.10938, -74.085938, 4218.2285, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_MODELVIEW_MATRIX:
{0.99992931, -0.004879978, 0.010840298, 0}
{0, 0.91186345, 0.41049367, 0}
{-0.011888071, -0.41046464, 0.91179901, 0}
{-287.10938, -74.085938, 4218.2285, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_CURRENT_MATRIX_ARB:
{0.99963969, 0.023475286, -0.013014656, 0}
{0, 0.48486927, 0.87458664, 0}
{0.026841579, -0.87427151, 0.48469457, 0}
{-215.40039, -576.11523, 6158.7266, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_MODELVIEW_MATRIX:
{0.99963969, 0.023475286, -0.013014656, 0}
{0, 0.48486927, 0.87458664, 0}
{0.026841579, -0.87427151, 0.48469457, 0}
{-215.40039, -576.11523, 6158.7266, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_CURRENT_MATRIX_ARB:
{0.99963969, 0.023475286, -0.013014656, 0}
{0, 0.48486927, 0.87458664, 0}
{0.026841579, -0.87427151, 0.48469457, 0}
{-215.40039, -576.11523, 6158.7266, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_MODELVIEW_MATRIX:
{0.99963969, 0.023475286, -0.013014656, 0}
{0, 0.48486927, 0.87458664, 0}
{0.026841579, -0.87427151, 0.48469457, 0}
{-215.40039, -576.11523, 6158.7266, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_CURRENT_MATRIX_ARB:
{0.99959737, -0.011129435, 0.026101092, 0}
{0, 0.91986758, 0.39222905, 0}
{-0.028374836, -0.39207113, 0.91949719, 0}
{-250.26758, -71.263672, 4190.2871, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_MODELVIEW_MATRIX:
{0.99959737, -0.011129435, 0.026101092, 0}
{0, 0.91986758, 0.39222905, 0}
{-0.028374836, -0.39207113, 0.91949719, 0}
{-250.26758, -71.263672, 4190.2871, 1}
GL_VIEWPORT: {4, 165, 512, 334}
GL_CURRENT_MATRIX_ARB:
{0.23925836, 0.38083714, -0.89315093, 0}
{0, 0.91986758, 0.39222905, 0}
{0.97095597, -0.093844078, 0.22008601, 0}
{2911.0664, 370.13428, 3481.4473, 1}
GL_PROJECTION_MATRIX:
{1.40625, -0, 0, 0}
{0, -2.1556885, 0, 0}
{0, -0, 1.0273149, 1}
{0, -0, -405.46298, 0}
GL_MODELVIEW_MATRIX:
{0.23925836, 0.38083714, -0.89315093, 0}
{0, 0.91986758, 0.39222905, 0}
{0.97095597, -0.093844078, 0.22008601, 0}
{2911.0664, 370.13428, 3481.4473, 1}
GL_VIEWPORT: {4, 165, 512, 334}
他们能做什么?有没有办法用它来获取相机位置?还是角色的全球定位?