Notifications
Clear all

[Closed] select Objects by Coordinate?

Hi everybody.
I have another question:

Is it possible in MaxScript to select Objects by Coordinates? I saw this “Picking Scene Nodes by Region” in the Help File and that seems to go in the right Direction, especially with defining a region and then getting all Objects in this region as an array.
I would like to have something like this, but the Region should only be based on coordinates that i define. And not on what i’m looking at in the Viewport.

Any Idea?

Thanx

3 Replies

would be quite easy to do – i have use similar stuff before using simple hit testing

you want to compare the objects pivot or bounding box to the region you are selecting withing

compare each of the x, y, and z components and if all are withing the rage so is the object then add to the array

Thanks for Answering.

But how do i do that?

I’m pretty new to MaxScript and just learning the Basics.

I have no idea how to define a region, in which i’m searching for Objects neither do i know how to compare object pivots with a range of coords instead of comparing it with a ceratin coord.

Thanks in advance

If you want to select by a specific position, try this:


posArray = #([0,0,0], [100,0,0],[200,0,0])
myCoords = posArray[2] as string
for i in posArray do sphere pos:i
myArray = for o in objects where (o.pos as string) == myCoords collect o
select myArray