PDA

View Full Version : move throw the z axis only



3DVan
02-04-2012, 03:55 PM
Hi,
I am using GLScene to respond to user display an image as a texture inside a sprite and the user click on the 3D world view window to set the x,y,z then he browse for an image to put on that location.

Camera set to perspective, view depth = 1000 and focal length = 200 however the user click x,y,z become something like 13,4, -700

I want to reduce the z axis to become for example 40 but keep the same location (x,y) where the user clicked

I tried to assign z = 40 and I tried many things to aligned the vector of the sprite to the camera vector but the sprite never move to same x and y where user first clicked.

Please advise how to move correctly on the z axis

Thanks