PDA

View Full Version : Limiting rotation of Orient Constraint - MAX


Pacermike
02-17-2011, 09:42 PM
Does anyone know of a good way to limit the rotation of an object that's using an orientation constraint in Max? For instance, I have a bone with an orientation constraint on it but I don't want it to be able to rotate past it's local 0, or some other number of my choosing. I've managed to get a setup kind of working but it seems overly complicated. Any tips from some seasoned pros would be awesome!

MattRennie
02-18-2011, 11:33 AM
One thing you could try is to have another bone with an expression which is driven by your orientation constraint bone and then just limit it by using a min max clamp inside the expression.

eek
02-18-2011, 04:16 PM
I tend to use scripts for these types of issues, are you trying to limit it past 0 in all axis'? or just one?

Pacermike
02-18-2011, 07:04 PM
Hi guys,

I'm trying to limit just one axis currently. I've been able to get it to work (kind of) with script controllers, using quatToEuler and then extracting the y axis, but I'm not super confident about my methods, or the results.

Basically the helper object I'm working with is constrained between two bones, bone01 and bone02. When the weights are 100% constrained to bone01 I don't want bone02 to be able to pass through the helper's the Y axis rotation. How would you guys go about doing that?

Pacermike
02-20-2011, 12:51 AM
Ok, I killed off the Orientation Constraint and instead copied an instance of both driving bone's rotational controllers in to a List Controller. I wired the weights in the list to make the helper "stick" to one bone or the other. Then I added a Euler XYZ to the List Controller and put a Script Controller in in the Y channel. This expression in the Script Controller keeps the helper limited by the lower lid bone:
limit = (lowerLid / 57.295781) - ((quatToEuler upperTrack).y / 57.295646)
if Rot_Spin/100 > limit then limit else if Rot_Spin/100 <= limit then Rot_Spin/100
I'll start another thread when the rig is closer to being finished to get people's feedback on it.

CGTalk Moderation
02-20-2011, 12:51 AM
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.