Get Near Vertices

Is there a way with python to get vertices within a certain range of the mouse?
thanks

does anyone know this?

edit: I mean in the game engine

I was wondering the same thing =/

lol i am working on a script to do this right now cause i was wondering about it.

SO if you want to select verticies its really not that rough…
when the mouse is clicked you need to get the “ray hit position” of the mouse and then compare that position with the verticies in an object. If the two positions are close enough then there’s the vert you want.

I’ll post a script by the end of the day if i can find out the exact command for “mouse.GetRayHit()” or whatever it is cause its not registering at the moment.

Ok thanks I’ll (try) to make a script for it. But when you get a vert does it return it as a number? You have to have a number when you use v = mesh.getVert(0, 1)
The line is mouse.getHitPosition()

edit: wait I think you have to have a custom cursor and have a ray on that and a python script that says yoursensor.getHitPosition() I think

How would I get their global positions?

and how can I get all the vertices positions?