when i right click the mouse i want my object to move at the mouse clicked position.how do i get this mouse location and gets applied to the object
Check out the Camera’s various functions, like ScreenToWorldPoint, it lets you take a screen point and convert it to a world position, then you can apply that position to your objects (by setting transform.position).
Note that the point could be any point along the ray below the clicked position so give the full range of Camera methods a look to be sure you’re using the one that offers expected results. Post any follow-up questions!