Independent Rot axes from two looked at dummies


#1

I have two dummies that each have a look at constraint to get them to look at another dummy. One rotates only in X, the other Y. I would like to make a third object have the X rotation of DummyA and the Y rotation of DummyB.

When I try to wire parameters I don’t have a way to get the rotation values because they are handle by constraints, rather than Euler controllers.

Is there a way I can get this rig to work?

Thanks.


#2

I think expose transform helper is exactly what you are looking for. I run into same thing when tried to rig some elements to react to IK controlled arm bending angle.


#3

Awesome!

That is precisely what I needed. Thanks!

How about this one… (I need to look into the script controlelr as this is probably easy)

I would like one dummy to rake the maximum z position of two other dummies. So whichever is higher is the position my dummy will take. Is there a way to do this without the script controller? (Not that I am afraid of the script controller, but I am new to Max and need to find some good examples.)

Thanks.


#4

I got this going in a script controller. I assigned the Z pos of object A to one variable A, the Z pos of object B to another variable B. I assigned the current object’s X to myX and the current object’s Y to myY.

Then I used:

if A > B then
MyMax = A
else
MyMax = B

[myX, myY, MyMax]

I am guessing there is some form of “self” in Max scripting that I could sue rather than creating myX and myY. I was also trying to see if there was a MAX() function, but could not get that to work.


#5

I don’t know of a self or me. for maxscript.

For max/min:


object.max[1] --or object.max.x --max x
object.max[2] --or object.max y --max y
object.max[3] --or object.max z --max z

object.min[1] --or object.min.x --min x
object.min[2] --or object.min.y --min y
object.min[3] --or object.min.z --min z


#6

Assign a float script controller only to the Z-Axis of the position controller, instead of a scripted position controller.

-Eric


#7

PixelMonkey… oh, duh… thx!

em3… I meant like MAX( A, B ), where the grater of A or B is returned…


#8

ah right, just collect an array of your positions and use amax/amin to get the highest/lowest


p=#(13,6,45,3,87,100,19,40)
--#(13, 6, 45, 3, 87, 100, 19, 40)
amax p
--100


#9

USeful for a large number of values. But I would guess a simple conditional like in my example above would be way faster for two values :wink: (Versus creating an array, inserting two values into it and then using amax, then GCing all of that.)


#10

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.