I’m new to game scripting but not new to programming in general so I’m just looking for a point in the right direction here. Is it possible to click on a certain point of an object and detect where it’s been clicked on that object? I’ve found how to click on the object as a whole, but not on a specific point.
For example, I have a sphere and i want to push it in the opposite direction from wherever i click on it, effectively pushing it along a plane or down some stairs etc. If I click on the left of it then it will be forced to the right, if i click it on the back then it will move forwards.
I’ve been trawling through the script reference and have found a couple of mouse events, but nothing that looks like it would be useful for what I’m trying to achieve, this has lead me to reach out to the good people of the unity community to see if they can point me in the right direction of a solution to this problem.
Thanks in advance 
First, you need to setup the infrastructure for “clicking” on an object, including Ray casting and Hit Colliders. There’s a bunch on the forums about both terms. Basically you get the screen point where you’ve clicked/touched, cast a ray and query the collisions of the ray with colliders on game objects.
Then, you should search for Nearest Point Test in the scripting forums. It’s a script that’s been posted here which allows you to do fast selection of nearest points on meshes. One you have your collision test working, it will return a point which can be fed into the nearest point test to return the closest point on a mesh to where you clicked.
Thanks for your reply.
Sounds like a plan you have there! I understand the theory of ray casting as I’ve been using it when detecting camera positions in another script, and that’s kind of what i was planning on doing but i don’t understand one thing;
To get the place where you have clicked/touched would you use mouse.position in an update on the camera? But if you do then how to do reference the 2d position clicked on the screen to a point in the 3d world?
I’m just trying to get my head around working in 3D space at the moment as it’s new territory for me, I’ve typically only done application development so sorry if the questions come across a bit obvious/dumb 
EDIT: Never mind I found the ScreenPointToRay method from this post http://forum.unity3d.com/viewtopic.php?t=33628 which answers my question i think 