Converting between screen coordination and isometric map coordination

The game consists of two coordination systems after applying the isometric map. One is the isometric map coordination and the other is the screen coordination. We often need to convert the coordination of a point between two systems when dealing with more than one coordination system.

For example, we may need to drag-and-drop some objects in the isometric map. When we press the object, we need to convert the screen position of the mouse to the isometric coordination. Then we will drag the object. The object follows the mouse position in screen coordination during the drag. After we drop the object, it is converted back from screen to isometric coordination so that it can align ...

Get Flash Multiplayer Virtual Worlds now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.