Display.getWorldCoordinates deprecated?

Hello all,

I just started playing with jME3 this week and I’m having some trouble translating a click on the screen to a position in the 3d world. I had no problems with the JME 3 Tutorial (8) Hello Picking and selecting a point using the camera, but the mouse has had me hung up for hours. I did a bunch of Googling and it seemed like there used to be a method “display.getWorldCoordinates” which translated the mouse position into world coordinates? I’m new to 3D programming but it seems like if I can translate the mouse coordinates to world points I’d be able to cast a ray straight down at that position to find the ground or any other collidable object

Thanks,

Crunchy

Resolved:



[java]Vector3f worldCoords = cam.getWorldCoordinates(new Vector2f(inputManager.getCursorPosition().x, inputManager.getCursorPosition().y), 0);

Vector3f worldCoords2 = cam.getWorldCoordinates(new Vector2f(inputManager.getCursorPosition().x, inputManager.getCursorPosition().y), 1);

Ray ray = new Ray(worldCoords, worldCoords2.subtractLocal(worldCoords).normalizeLocal());

[/java]



I guess cam.getWorldCoordinates is the new display.getWorldCoordinates



Thanks.