Notifications
Clear all

[Closed] Lookat_constraint

I have make a Script, but is some think wrong at line 8. Hop one can help my

prev=$
new=instance prev
select new
paramWire.connect prev.pos.controller.Path_Constraint.controller[#Percent] new.pos.controller.Path_Constraint.controller[#Percent] “Percent+0.0098”
select prev
prev.rotation.controller = LookAt_Constraint ()
prev.rotation.controller.upnode_world = off
prev.rotation.controller.lookat = new
prev.rotation.controller.pickUpNode = new
select new

2 Replies

hi kakuna031,

try this:

–change rotation controller to look at:
$ObjectA.rotation.controller = LookAt_constraint()

some other handy ones:
–add lookat target:
$ObjectA.rotation.controller.appendtarget $ObjectB 100

–specify look at axis. 0 = x, 1 = y, 2 = z:
$ObjectA.rotation.controller.target_axis = 0

I’m not a coder too, so i encountered the same problem at first when i noticed some maxscript command don’t show up in the listener. I found it helpful if u go into the MaxScript Reference and type in what u’re looking for at the search or index tap, that usually results in what i want. hope these helps.

-yan

thank you so very much. This prob made my whole work progress stand still.