Page 1 of 1

Can I move a mask, controlled by a bone?

Posted: Tue Jun 22, 2010 10:13 am
by ruibjr
Is it possible to move shapes (and a mask, for instance), based on a bone's angle?
The idea would be to have a bone control a shape position, so that shape would move up and down, based on the bone angle.
Can that be done without having to resort to the use of Lua scripts?

[edit]
Ok, let me clarify it :)
I would like the bone's angle to control the linear position of a shape - say, its Y position.
For instance: a 0 degree would leave the shape at its original position; a 30 degrees angle would move the shape, say, 100 pixels up; a 60 degrees angle would move the shape 200 pixels (that is, a linear change).
[/edit]

Thanks,

Rui

Posted: Tue Jun 22, 2010 2:44 pm
by Genete
Checkout my "famous" springy bone composition(*).
Say you have three bones in a linear chain. A<B<C (C is parent of B and B parent of A)

You can obtain linear oscillation of A based on rotation of C if you do like this:

B.length=C.length
B.initial_angle=180
Constraints B.angle=-1*C.angle
This is a simple rod piston mechanism that converts a rotation (C rotation) into a oscillation (A global position)

Hope it helps ;)

-G

(*) Hmmm it seems that I'm getting old. I'm quoting my self!

Posted: Tue Jun 22, 2010 4:22 pm
by ruibjr
That's really cool.
Thanks, genete.

Posted: Tue Jun 22, 2010 4:35 pm
by sbtamu
Genete wrote:
(*) Hmmm it seems that I'm getting old. I'm quoting my self!
It gets worse, you know you are getting old when you take an aspirin before you go to bed because you hurt to much when you get up in the morning to go take one.