Screen to world for perspective camera
Describe the example you'd like The current example is for the ortographic mode. We need an example for the perspective camera mode.
Additional context (optional) I've already implemented the code, will be used for entity picking, orbit camera (panning requires it) etc - the issue is like a reminder to make an example.
Plus, I'll update the manual to add and to state that the current function is for ortho camera, and there is a new function for perspective.
https://defold.com/manuals/camera/#converting-mouse-to-world-coordinates
For the future - use code from https://github.com/defold/examples/blob/master/input/entity_picking/example/camera_math.lua
Maybe we should have a shared folder/library project with this kind of stuff (camera controls, extra math functions, materials).
Maybe we should have a shared folder/library project with this kind of stuff (camera controls, extra math functions, materials).
I don't even know. I like that each project in the examples uses only what it really needs to work and is completely isolated. I know that when a project references a dependency or a large library, even experienced programmers view it as a black box, which makes the overall study of the engine harder.
I can see both sides. Perhaps we can have a project with "best practices" code, and we can copy files manually into examples to avoid dependencies.
Maybe we should have a shared folder/library project with this kind of stuff (camera controls, extra math functions, materials).
I don't even know. I like that each project in the examples uses only what it really needs to work and is completely isolated. I know that when a project references a dependency or a large library, even experienced programmers view it as a black box, which makes the overall study of the engine harder.
This is a valid argument. The inconvenience of having duplicated files is not too bad. Let's keep it as-is for now.