Hi Guys,
I was wondering if there's a way to have a pin bone that can move only on X, but not on Y and vice versa.
Any light on this will be appreciated.
Thanks
Bone To Move Only On X or Y
Moderators: Víctor Paredes, Belgarath, slowtiger
- BrianLucas
- Posts: 37
- Joined: Sat May 08, 2021 6:55 pm
Re: Bone To Move Only On X or Y
Do you mean to constrain it in one direction for animation?
Normally, you would just press and hold Shift to constrain the movement, but I'm guessing you want to set up a control for this as part of a rig.
If you don't mind using two bones, you can use a Constraint for that.
1. Create two Pin bones. Name the constrained bone BoneA and the control bone BoneB
2. Select BoneA and then set the Position Constraint to BoneB, and set the value in the first scale box to 0%.
3. Close the Constraints panel.
Now when you move BoneB, it will move BoneA but only along the Y axis.
To make BoneA move only along the X axis, set the first scale box to 100% and the second box to 0%.
Extra points: You can set two Pin bones to be constrained by the same control bone and set one Pin bone to be constrained to X and the other to Y.
Another way is the set up a Smart Bone action that drives the moving bone along one axis. You'll probably want to Shy the moving bone so it doesn't get accidentally keyframed by the animator. (If this motion were something I needed to repeat, I'd probably go for this method.)
Normally, you would just press and hold Shift to constrain the movement, but I'm guessing you want to set up a control for this as part of a rig.
If you don't mind using two bones, you can use a Constraint for that.
1. Create two Pin bones. Name the constrained bone BoneA and the control bone BoneB
2. Select BoneA and then set the Position Constraint to BoneB, and set the value in the first scale box to 0%.
3. Close the Constraints panel.
Now when you move BoneB, it will move BoneA but only along the Y axis.
To make BoneA move only along the X axis, set the first scale box to 100% and the second box to 0%.
Extra points: You can set two Pin bones to be constrained by the same control bone and set one Pin bone to be constrained to X and the other to Y.
Another way is the set up a Smart Bone action that drives the moving bone along one axis. You'll probably want to Shy the moving bone so it doesn't get accidentally keyframed by the animator. (If this motion were something I needed to repeat, I'd probably go for this method.)
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2020 Edtion
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2020 Edtion
Re: Bone To Move Only On X or Y
Another tip: If you want the bone to slide in a direction other than X or Y, parent it to another bone and rotate that bone to the angle you want, then Shy it. Now the child bone will use the Shy bone's direction as its X axis. If you want it to slide along Y, just figure that into your Constraint setup or Smart Bone animation.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2020 Edtion
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2020 Edtion
- BrianLucas
- Posts: 37
- Joined: Sat May 08, 2021 6:55 pm
Re: Bone To Move Only On X or Y
Thank you, Greenlaw
- hayasidist
- Posts: 3525
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Bone To Move Only On X or Y
And ...BrianLucas wrote: ↑Sat Mar 23, 2024 8:29 pm ... I was wondering if there's a way to have a pin bone that can move only on X, but not on Y and vice versa.
If you don't otherwise make a lot of use of "muted channels": In motion graph: select the bone's translation channel, separate dimensions; mute the axis you want constrained (i.e. mute Y if you want it to move only on X). Remember to clear the "Render muted channels" checkbox in export animation.
There are also many solutions that involve scripting which, if you have loads of bones to constrain, might be a better option.
Re: Bone To Move Only On X or Y
Ooo! That's a good one, Paul! It never occurred to me to use Graph Editor that way.
Thanks for sharing.![Smile :)](./images/smilies/icon_smile.gif)
Thanks for sharing.
![Smile :)](./images/smilies/icon_smile.gif)
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2020 Edtion
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2020 Edtion