Notifications
Clear all

[Closed] driving rotation problem

A and B are bones in 2 separate hierarchies.
B rotation values are nonzero(and must remain thus).
I need control the rotation of obj A from obj B in the following way:

A rotation follows B rotation
A is also still inherits everything from its on hierarchy.

orient constraining A to B fails, because A loses its hierarchy orientation, becoming completely slaved to B

I tried param wiring B to A, which got me close,
But B is not at a zero value to start, so A is forced into the initial orientation of B.
I need A to stay put when the connection is made.

would a scripted rotation controller solve this problem?

2 Replies

you can use rotation list controllers for both A and B nodes. list controllers has to have two subcontrollers: Initial and Zero. if you wire (or use the same instance) Zero controllers you will get what you want

here is a sample


delete objects
b0 = box name:"parent" width:1 length:1 height:5 wirecolor:red
b1 = box name:"source" width:1 length:1 height:3 parent:b0 wirecolor:orange position:[0,0,5]
b1[#transform][#rotation].value = eulerangles 0 40 0

b2 = box name:"target" width:1 length:1 height:3 wirecolor:green pos:[10,0,0]

c1 = b1.rotation.controller = Rotation_List()
c1.available.controller = Bezier_Rotation()

c2 = b2.rotation.controller = Rotation_List()
c2.available.controller = Bezier_Rotation()
c2.setactive 2

paramWire.connect c2[2] c1[2] "Smooth_Rotation"

Thnak Dennis.
your scritp works as advertised

In my case, I was stuck with an object B that had a rotation.controller[2]=Euler_xyz. that I can’t change (too many downstream things dependent)

I was able to use my first attempt -param wiring the X_rotation, y_rotation, and z_rotation, and adjusting for the offset of A in the “Froze Rotation” controller.