Jump to content

Translation Limits


Jim Su

Recommended Posts

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

Link to comment
Share on other sites

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. :)

  • Like 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...