gets the node screen position * Returns the screen position of the supplied node. This function returns the * calculated transformed position of the node, taking into account any parent node * transforms. * * @name gui.get_screen_position * @param node [type:node] node to get the screen position from * @return position [type:vector3] node screen position */
| 4486 | * @return position [type:vector3] node screen position |
| 4487 | */ |
| 4488 | int LuaGetScreenPosition(lua_State* L) |
| 4489 | { |
| 4490 | DM_LUA_STACK_CHECK(L, 1); |
| 4491 | InternalNode* n = LuaCheckNodeInternal(L, 1, 0); |
| 4492 | Scene* scene = GuiScriptInstance_Check(L); |
| 4493 | Matrix4 node_transform; |
| 4494 | CalculateNodeTransform(scene, n, CalculateNodeTransformFlags(), node_transform); |
| 4495 | Vector3 node_screen_pos = node_transform.getCol3().getXYZ(); |
| 4496 | dmScript::PushVector3(L, node_screen_pos); |
| 4497 | return 1; |
| 4498 | } |
| 4499 | |
| 4500 | /*# sets screen position to the node |
| 4501 | * |
nothing calls this directly
no test coverage detected