0
\$\begingroup\$

I have this formula to get the isometric X and Y given 2D coordinates for an isometric video game

//Isometric X Position
(((u_blockRotation[0]*(a_position[0]) + u_blockRotation[1]*(a_position[1]))*(27.0))-u_camera[0])*u_resolution*u_zoom/u_screenSize[0],

//Isometric Y Position
(((u_blockRotation[2]*(a_position[0]) + u_blockRotation[3]*(a_position[1]))*(13.0))-u_camera[1])*u_resolution*u_zoom/u_screenSize[1],

It uses the current resolution, zoom factor, and screen size plus the rotation variables of the map to correctly place them on the screen. I need to solve the system of equation for a_position in order to get a formula to turn screen space coordinates into grid coordinates. When I try to do this I end up with something very nasty, and online system of equation solves are not able to resolve it.

Thanks

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.