About TraceScreenRay()...
Moderator: Moderators
About TraceScreenRay()...
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!
Nope, it really returns {x, y, z} (y is the
vertical dimension in Spring's coordinate
system):
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);