Jim Su Posted January 10, 2006 Share Posted January 10, 2006 Hello all, I'm trying to create a cursor that is constraint inside a square. It's going to be used like a joystick pad as an animation tool. The cursor will be constraint in -1>x<1 , -1>y<1, and z = 0. In SoftImage, this was easy, just apply constraint limits. In Houdini, if I lock the Z parameter, then the cursor can no longer be moved freely (only one axis at a time) by the mouse. If I use the clamp expression, the value locks at 0. I created a workaround solution: a secondary cursor uses the clamp expression referencing the primary cursor that the mouse moves. Does anybody have any ideas for a direct solution? Thanks Jim Quote Link to comment Share on other sites More sharing options...
edward Posted January 10, 2006 Share Posted January 10, 2006 Hmm ... maybe something like this? tx: clamp(cubic(),-1,1) ty: clamp(cubic(),-1,1) tz: clamp(cubic(),0,0) You can still move the handle beyond the bounds but the underlying object should stay within the constraints. You can keyframe these channels and the cubic() will do the regular interpolation. BTW, nice to see you around. 1 Quote Link to comment Share on other sites More sharing options...
Jim Su Posted January 10, 2006 Author Share Posted January 10, 2006 Thanks Ed!!! It worked! The problem with my expression was: Cross_tx : clamp(ch("../Control_tx),-1,1) Control_tx : cubic() So I used your expression for the top parameter: Cross_tx: ch("../Control_tx) Control_tx: clamp(cubic(),0,0) This is also good because the animator can now blow away the clamp or adjust it if they want to. Thanks Jim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.