how to move a selected 3d mesh to a other place with one mouse click

Blitz3D Forums/Blitz3D Programming/how to move a selected 3d mesh to a other place with one mouse click

H!

-I have a 3D world
-I have a 3D mesh
-I can select the 3D mesh and when this happend then
 object\selected = 1 


And I have this code below:

 
If MouseHit(2) 
  For object.thing = Each thing
     If object\selected = 1 Then

	;object\x = object\destX
	;MoveEntity object\entity,object\x,object\y,object\z
	
      EndIf
  Next
EndIf


What I want is:
I have a selected object
Then I click with my rightmouse a other place and the object must move there with a speed#

And the objects are later for example people and they can't fly , so the 3D y coordinate is 0 or something ¿

Well as you can see I need some help here
BTW I made a field with
object\pivot =CreatePivot()

and its at the same place as the object.

Thanks :]