Notifications
Clear all

[Closed] Help with getting position – Mouse Tool

 CMM

I’ve written a small tool that places objects down on the world space grid. When the tool is active, everytime you left-click it places a random house model down (with an adjustable Z rotation value). This works fine but I’d like to make it recognize hills and valleys, it doesn’t need to follow the normal of the ground plane, just need the position from it. I’m currently using a “Scripted Mouse Tool” for this but in the documentation I only see worldPoint and gridPoint. Neither seem to be of any use to me. How would I go about finding the world space position value of where my mouse clicks on a given editable poly?

2 Replies
1 Reply
(@batigolnguyen)
Joined: 11 months ago

Posts: 0

Have a look at some existing tools for inspiration, for example AutoPlace (random pick, there are heaps of similar scripts around). MouseTrack gives you the intersection data so you don’t have to handle it yourself – you can also use thePainterInterface.