Page 1 of 1

About TraceScreenRay()...

Posted: 20 Nov 2007, 14:48
by Pendrokar
Is this how it supposed to be that when using Spring.TraceScreenRay(mousex, mousey, true/false) it returns three variables (x,z,y) not (x,y,z)!!! This confused me!

Posted: 20 Nov 2007, 15:09
by Tobi
Why do you think x,z,y?

I assume it is in normal Spring world coordinate system, ie. +x in east direction, +z in south direction and +y upward, given the coordinate (x,y,z).

Posted: 20 Nov 2007, 15:10
by Kloot
Nope, it really returns {x, y, z} (y is the
vertical dimension in Spring's coordinate
system):

Code: Select all

	lua_newtable(L);
	lua_pushnumber(L, 1); lua_pushnumber(L, groundPos.x); lua_rawset(L, -3);
	lua_pushnumber(L, 2); lua_pushnumber(L, groundPos.y); lua_rawset(L, -3);
	lua_pushnumber(L, 3); lua_pushnumber(L, groundPos.z); lua_rawset(L, -3);

Posted: 20 Nov 2007, 15:11
by lurker
MiveHind