Notifications
Clear all

[Closed] Link constrain how does it work ?

Hi everybody

I’m not questioning about how to use the link constrain or how to apply link con via Maxscript.
What i’m looking for is , how does link constrain work ? If i like to create similar constrain or result via Maxscript can i use Rollout or it must be done by script controller?
While i was searching there were some pages that saying you can create similar result by using position or rotation constrain !! but when i use only orientation constrain it won’t create the same result especially in walk cycle.

Thanks in advance

1 Reply

Hi
I give an example to show what i’m looking for , hope someone find this thread interesting and leave a reply
as far as i know we can create the similar link Constraint result by position con and Orientation con but , in animation it doesn’t work the same
here the example


delete objects
---Test objects
linkConObj = teapot wirecolor:orange  radius:15 smooth:off showTrajectory:on lid:off handle:off spout:on
OrconConObj = teapot wirecolor:blue  radius:15 smooth:off showTrajectory:on    body:on spout:off
--animate them
animate on 
(
    at time 0 (linkConObj.pos = linkConObj.pos    ; OrconConObj.pos = OrconConObj.pos )
    at time 50 (linkConObj.pos = [200,0,0]        ;OrconConObj.pos = [200,0,0]    )
)
---create animated helper as link in link constrain
AnimObj1 = point size:50 wirecolor:yellow pos:[100,0,0]
animate on 
(
    at time 24 AnimObj1.transform = AnimObj1.transform
    at time 25 rotate AnimObj1 (eulerAngles 0 0 -90)
)
---apply link constrain
linkConObj.Transform.controller = Link_Constraint ()
linkConObj.transform.controller.AddTarget AnimObj1 20--currentTime.frame
linkConObj.transform.controller.addWorld frameNo: 25
--apply the orient constrain 
Orcon = Orientation_Constraint ()
OrconConObj.rotation.controller = Orcon
OrConstraintInterface = Orcon.constraints
OrConstraintInterface.appendTarget AnimObj1 100

whenever i searched about parent and parent space i notice that i have to multiply the transform of the object (here the blue teapot) by the inverse transform of the parent object (here the yellow point helper)

obj.transform * inverse ob_As_parent.transform

but if i do this i’ll see the orientation constrain result not link constraint result

What i’m looking for in this thread is , what is the math behind the parenting ( i mean whenever we use “Select and link” icon in 3ds max ) what will happen?

Thanks in advance