Explode maxscript problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
Situation: I have a base box and four more boxes of different sizes, which I want to explode them outside the base with 100 mm.
Like so:
I tried this way, but it's not what it takes.
--select all boxes
select $*
--explode
for selObjs in selection do
(
selObjs.pos.x = (selObjs.position.x + 100)
selObjs.pos.y = (selObjs.position.y + 100)
selObjs.pos.z = (selObjs.position.z + 100)
)
)
Here is the code for boxes:
--boxes
box_1 = box length:500 width:500 height:500
box_1.pos = [0,0,0]
---
box_2 = box length:500 width:500 height:100
box_2.pos = [0,0,-100]
---
box_3 = box length:500 width:500 height:100
box_3.pos = [0,0,500]
---
box_4 = box length:500 width:100 height:500
box_4.pos = [-300,0,0]
---
box_5 = instance box_4 -- Atention, this is an instance !
--box_5.pos = [300,0,0]
box_5.pos = [300,0,0]
Maybe you have any idea how this can be done ? Please !
