Creating rotating dynamic components
-
I have some doors on a house I'm designing, and I want them to rotate around the z-axis at the center of the door, like a revolving door. I know how to make the component rotate but it's always rotating about the edge of the component, how do I get it to rotate about the center?
Also, I was wondering if it's possible to create compound animations where you click once and something happens, then you click a second time, and something different happens, and the third click sends it back to the start. For instance, if my first click rotated the door, and then the second click slid it to the left 5 feet. Any help would be greatly appreciated thanks.
-
You can change the centre of rotation by moving the component axes (right click component->change axes.)
-
@minusthetoast said:
Also, I was wondering if it's possible to create compound animations where you click once and something happens, then you click a second time, and something different happens, and the third click sends it back to the start. For instance, if my first click rotated the door, and then the second click slid it to the left 5 feet. Any help would be greatly appreciated thanks.
Yes you can do that! It is a little tricky, but once you get the hang of it, its pretty straightforward.
The idea is that you can put in an animation value like this:
X - =if(animate_me<0,animate_me)
ROTZ - =if(animate_me>0,animate_me/2)
OnClick - ANIMATESLOW("animate_me",-100,0,100,0)
Using the if makes the X or ROTZ only animate when the animate_me attribute is within the right range. And this is a very basic setup. To get things to move the precisely right distance and to rotate the precise right amount, you will need to get more complex. But here's a simple example. Lets say I want the drawrer to slide out 10" and the rotation to be 90 degrees. You could use these values:
OnClick - ANIMATESLOW("animate_me",-10,0,90,0)
X - =if(animate_me<0,animate_me)
ROTZ - =if(animate_me>0,animate_me)
So in that example I changed the OnCick values to equal the values I wanted animated.
Anyhow, I think that makes sense, right? The trick lies in the If statements making the animation only occur sometimes if certain conditions are being met.
Chris
-
Oh ok I see what you mean. Do you think you could give me a little bit of a walkthrough for how to write in the formulas so the animations occur in the correct order? I'm a little new to animating dynamic components. By the way, I'm an architecture major at Calpoly SLO
-
Sure, I'll give it a quick go.
OnClick - Animate("animate_me",-90,0,60,0)
ROTZ - =if(animate_me<0,animate_me)
X- =if(animate_me>0,-(animate_me))
Notice that in the X field I have the anmiate_me attribute wrapped in -(anmiate_me) (the negative sign and parentheses). That is because the value is 0 to 60, which move the door to thr right. But I wanted left, so I wrapped it in those parentheses and said that I wanted the opposite of animate_me, which is 0 to -60, which moves the door to the left.
So that should solve it. Let me know if I missed anything or if it doesn't make sense,
Chris
-
Chris, thanks. I'm currently making a bus with a ramp and your formula worked!
I had to figure out that I had to invert the X and RotZ formulas to make it work!
-
This is almost what I've been looking for !
I need a window to first tilt (Red or green axis), then return closed, and on the next couple of clicks, turn on the Blue axis, and then close and repeat.. can you help me?
Cheers,al
Advertisement