Notifications
Clear all
[Closed] object position = mouseclick?
Feb 02, 2011 11:30 am
Can I tell a selected object to inherit the position where I next click my mouse? (xy)
I’m wondering why I am forever dragging objects to where they need to be, and I see that my cursors position is always showing up…
4 Replies
Feb 02, 2011 11:30 am
$.pos=mouse.pos
– Unable to convert: [844,525] to type: Point3
If I could express the mouse position as type: Point3 thatd be fine, because I only want the x,y coords to be inherited.
Feb 02, 2011 11:30 am
$.pos=[mouse.pos.x,mouse.pos.y,0]
But that would place all objects in Z = 0
Feb 02, 2011 11:30 am
Thanks Kameleon
Now I find that my mouse pos is expressed in screen space, pixels beginning in the topleft
so my active screen resolution is 905px across, so my x is somewhere from 0-905px but being translated into my scene units (905m) ha!
Ill check how to get a worldspace cursor read out