Skip to content

defold/sample-screen-to-world-coordinates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This sample project shows how to convert from screen to world coordinates while using a camera component. The conversion is made in the screen_to_world(camera, x, y, z) function in camera.lua.

The project also shows how the screen_to_world() function can be used to anchor game objects to the corners of the screen regardless of screen resolution and aspect ratio.

Credits

Graphics by Kenney.nl

About

This sample project shows how to convert from screen to world coordinates while using a camera component.

Resources

License

Stars

Watchers

Forks

Languages