i'm newbie in 3D graphics...i'm programming application for showing medical data in WebGL. Everything works fine, but i would like to implement moving object with mouse (concrete moving with concrete object in x,y,z axis).
My idea is:
I have succesfully calculated the normal of cut (with i want moving). Then i calculate vector of clicked position and my current(mouse move) position (this is vector of new direction). Then i'm trying to calculate angle between normal and vector direction and get the real distance to move.

But it's not working. It seems to be good, but it reacts after about 1cm of dragging..(then it reacts good). But i need immediately reaction.

I might calculate direction vector wrong, because i'm not sure, how can i get point in 3D space. Point on object(where i catch object) is obvious. I'm using framework O3D, but i haven't found any amthod to moving object. I would like to write it in webgl. In O3D is function to pick object and get the position of click in object.

Is my method ok?Help please.

Thank you.
Tomáš Sychra