Notifications
Clear all

[Closed] object position = mouseclick?

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
$.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.

$.pos=[mouse.pos.x,mouse.pos.y,0]

But that would place all objects in Z = 0

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

$.pos=pickPoint()