convert screen position to the local node position * * Convert the screen position to the local position of supplied node * * @name gui.screen_to_local * @param node [type:node] node used for getting local transformation matrix * @param screen_position [type:vector3] screen position * @return local_position [type:vector3] local position */
| 4525 | * @return local_position [type:vector3] local position |
| 4526 | */ |
| 4527 | int LuaScreenToLocal(lua_State* L) |
| 4528 | { |
| 4529 | DM_LUA_STACK_CHECK(L, 1); |
| 4530 | Scene* scene = GuiScriptInstance_Check(L); |
| 4531 | InternalNode* node = LuaCheckNodeInternal(L, 1, 0); |
| 4532 | Point3 screen_position = GetPositionFromArgumentIndex(L, 2); |
| 4533 | Point3 local_position = ScreenToLocalPosition(scene, GetNodeHandle(node), screen_position); |
| 4534 | dmScript::PushVector3(L, Vector3(local_position)); |
| 4535 | return 1; |
| 4536 | } |
| 4537 | |
| 4538 | /*# gets the normalized cursor of the animation on a node with flipbook animation |
| 4539 | * This is only useful nodes with flipbook animations. Gets the normalized cursor of the flipbook animation on a node. |
nothing calls this directly
no test coverage detected