I want to have the screen coordinate of a point in the scene knowing its world coordinates.
for example if my point is in world coordinate is at 10, 1200, 15 and on the screen at 0,0 (bottom left of the screen ?) i want to find 0,0 but if it’s not on the screen i want to have the coordinates in the screen plan (for example -150, -1000 because the camera doesn’t see it but it has a projection on the camera plan)
hope this text is clear i’m not sure of my english
is there an easy way to have this ?
* Translate world to screen coordinates
* @param worldPosition Vector3f representing the world position to retrieve.
* @param store Vector3f to store the world position in.
* @return Vector3f The store vector3f, after storing.
public abstract Vector3f getScreenCoordinates(Vector3f worldPosition, Vector3f store);
* Translate screen to world coordinates.
* @param screenPosition
* Vector2f representing the screen position with 0,0 at the bottom left.
* @param zPos float The z position away from the viewing plane.
* @return Vector3f A vector3f representing the vector's world position.
public abstract Vector3f getWorldCoordinates(Vector2f screenPosition,
i can’t believe it’s so simple ! 8-O
it works great ! 8)
thanks mojo !