View Full Version : Limiting rotation of Orient Constraint - MAX
02-17-2011, 08: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!
02-18-2011, 10: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.
I tend to use scripts for these types of issues, are you trying to limit it past 0 in all axis'? or just one?
02-18-2011, 06:04 PM
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?
02-19-2011, 11:51 PM
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.
02-19-2011, 11:51 PM
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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.