- Home /
CrossHair Automatically Tracking Object
Hi,I want to use the CrossHair locking the Object.like this ex. https://www.dropbox.com/lightbox/home/Text CrossHair is GUITexture.how can I use it to track the Object? when I input Alt Key and active it. Please everybody can help me. thx .
Comment
Schematic diagram: https://www.dropbox.com/s/btg1o3kgf366rvh/3.png
Answer by Rasikh · Oct 30, 2013 at 10:09 AM
What i understand about your problem is that you want to find out that on which game object crosshair is targeting. for that you need to raycast from your mouse x,y position (or from center of your crosshair) into the 3D scene. here is a similar post with example which can help you. http://answers.unity3d.com/questions/388025/converting-iphone-touch-to-world-coordinates.html
Your answer