Lutze Posted May 15, 2011 Share Posted May 15, 2011 Hello everybody, in order to animate/rig a special piston I need to know how to restrict movement/rotation of objects on certain axis. What have I got to do when I have say 3 cubes. No.1 is the parent of no.2 and is rotating (and therefor no.2 is rotating around it). Now I want Cube no.3 that is some distance away to move only on the x-axis exactly the distance that cube no.2 is traveling on this axis while rotating around cube no.1. So, how do I read the global transforms of a child object? Is there an expression I can use. Tried tx etc. but this does not seem to work here. Then just another question I need answered for this rig. I want a child object to react to its parent movement/rotation but at the same time to stay on a path/curve or local axis. In both cases I want to restrict movement to certain axis or to curves/paths. The attached picture shows the layout of the rig. Thanks in advance for the help Lutze Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted May 15, 2011 Share Posted May 15, 2011 I'm sure there are a dozen ways to do what you want in Houdini. It isn't so much that you want to restrict movement, where as, you want to only assign transforms to the axises that you want to follow the other object. For example, if you wanted box01 to follow box02 but only on the Y axis, then you could use the origin("box01","box02","TY") expression in the box01.ty parameter. You wouldn't have to parent box01 to anything as it will just follow box02 on the Y axis. To restrict an axis from changing (i.e. interactively in the viewport). You would assign a constant() expression to the axis. I often do this for character rigs to prevent the animator from making movements that aren't allowed. Quote Link to comment Share on other sites More sharing options...
edward Posted May 16, 2011 Share Posted May 16, 2011 So, how do I read the global transforms of a child object? Is there an expression I can use. Tried tx etc. but this does not seem to work here. I usually use vtorigin("","/obj/path")[i] for global translates, where i is 0, 1, or 2 for tx, ty, or tz. Use vrorigin() instead for rotations. I want a child object to react to its parent movement/rotation but at the same time to stay on a path/curve or local axis. In both cases I want to restrict movement to certain axis or to curves/paths. The attached picture shows the layout of the rig. Have you tried using a Blend object? You can then take the translates from an parent object that's on a path/curve, while using the rotations from a different parent object. Quote Link to comment Share on other sites More sharing options...
Lutze Posted May 16, 2011 Author Share Posted May 16, 2011 I usually use vtorigin("","/obj/path")[i] for global translates, where i is 0, 1, or 2 for tx, ty, or tz. Use vrorigin() instead for rotations. Have you tried using a Blend object? You can then take the translates from an parent object that's on a path/curve, while using the rotations from a different parent object. Thanks a lot to both of you... this solved most of the problems I have with this rig. Lutze 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.