MEL - Create object at mouse position

Hi guys. I need your help with the script

CreatePolygonCube;
polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;
move -r -os -wd mousePosition mousePosition 0;

How can I use mouse positon in MEL to use this script? I want to create an object at cursor but only with X and Y coords.

float $pos[] = autoPlace -useMouse;
move $pos[0] $pos[1] $pos[2] polyCube1;

1 Like

This topic was automatically closed after 87 days. New replies are no longer allowed.