Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

link with nearest object

1 REPLY 1
SOLVED
Reply
Message 1 of 2
mamithaa
629 Views, 1 Reply

link with nearest object

I have a set of helpers and planes distributed horizontally, I want to make each plane adds to itself "Position Constraint" to link with nearest 4 helpers without change its position.
Tags (1)
1 REPLY 1
Message 2 of 2
mamithaa
in reply to: mamithaa

p = $plane** as array
a = p.count
select $plane*
for i = 1 to a do
(

selection[i].pos.controller = Position_List()
selection[i].pos.Available.controller = Position_Constraint()
selection[i].pos.controller.SetActive 2
)


o = $point** as array
s = o.count

for b = 1 to a do
(
for j = 1 to s do
(
d = distance p[b] o[j]
if d < 60 do
(

p[b].position.controller.Position_Constraint.appendtarget o[j] 50.0
p[b].pos.controller.Position_Constraint.controller.relative = on
)
)
)

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report