Game Development Community

Coordinate system problems -- please help

by Jack Cicci · in General Discussion · 12/26/2008 (1:24 pm) · 0 replies

Hi all!!!
(sorry for my poor english)

My entire game area is 1024x768; the camera area is 800x600 (like design resolution) and it's mounted on the player; moving the player around, the camera follow him...

Of course, using player.getPosition(), i obtain the player's position in World Space coordinate system...

I can convert this to Window Space using sceneWindow2D.getWindowPoint()... this is the player's position in pixel inside the 800x600 window.

But i need to know the player's position in pixel referred to the entire 1024x768 game area...

How can i do?

Perhaps getCanvasPoint maybe usefull but all my tests were gone wrong.

Thanks