[2.5] Getting click position in 3d space

In 2.49 it was possible to find the position of a click using the getHitPosition() function, however it or any type of variant doesn’t seem to be working in 2.5.

What was it changed to?

Also, I can get the click’s position in the game window in pixels using .position, however how can I get the same position for objects? Using object.position returns the objects position in 3d space… :spin:

In 2.49 I believe there is an instance variable called hitPosition which replaced getHitPosition

Check the GameEngine API, you can find interesting functions at the KX_Camera.