Notifications
Clear all

[Closed] attachment constraint add target

Hi all

I have a new question, how can I append a target to an attachment constraint via maxscript?

Im doing this.

$.pos.controller = position_list ()
controladorBola= $.pos.controller.Available.controller = Attachment ()
$.pos.controller.weight[2] = 0
$.pos.controller.setActive 2

thanks

3 Replies

Well, now I get how to add the target, but now I dont know how to activate the set position to get the position from the surface

attachito= attachment()
positionsita= Position_XYZ()
$.pos.controller = position_list ()
$.pos.controller.Available.controller = attachito
$.pos.controller.Available.controller = positionsita
attachito.node = $esferita
$.pos.controller.weight[2] = 0
$.pos.controller.setActive 2
$.pos.controller.setActive 3

you have to add a key to the attachment controller. the key will have a position value (as i remember in bary coordinates). to get wold position you have to know world positions for this key face vertices.
(you can find a sample(s) how convert bary to world on this forum or in the max script help)

thanks denisT