Inconsistent object movement from mouse position

I have a number of objects on my scene and want to move them using the mouse.
Some of them work fine but others seem to be tacking waay off cooridinate.
I am very confused as to why some objects would track fine and others not.

In all cases, we set the position.x and position.y properties on the meshes.
Using the treejs chrome extension I found that those who track right show their position correctly in the extension. Those who don’t work right show their position as 0, 0, 0 even though that is no what it is.

I had a look at the example drag control and it uses some matrix manipulation but to be honest I am not sure what it’s trying to do.

Any ideas on what could be causing this inconsistancy?

1 Like

I think we have found the problem.
The geometry data was not normalized so the vertices positions scaled with the input position caused problems.

I’m having this problem too actually. Hard setting position to 0,0,0 before mouse controls are even active but getting a wobble during rotation like its off center. What exactly was your fix for this? Could post a little sample? Or give a little more explanation?

Thank you!