3

I'm trying to make a garage door open or close by rolling up or down like they usually do. I know how to make an object follow a path in one direction along a curve using constraints, but I need it to move in both directions. Is there a way to do this?

Also, when I try using the Follow Path constraint with a NURBS Path, the object attached to it only goes about a third of the way along the path and then lifts off and heads out into space. By reducing the number of keyframes, I can get it to follow the path just long enough to roll up like I want it to, but that seems to be a poor way to do this, and it still only allows the object to go in one direction.

Anthony Forwood
  • 686
  • 1
  • 6
  • 19
  • 1
    "in either direction" what does that mean? – eromod May 16 '16 at 01:38
  • 1
    Please include a Blender screen capture to clarify your success and problems. – atomicbezierslinger May 16 '16 at 05:36
  • A screen capture won't help much, since I don't know how to capture this problem. – Anthony Forwood May 16 '16 at 06:26
  • I want to move an object in both directions along a curved path. I.e. move it in one direction along a curve, as well as move it back in the other direction. Garage doors go up and down along the same path. That's what I'm trying to simulate. – Anthony Forwood May 16 '16 at 06:32
  • There's a better way to do this, using array modifier and curve modifiet, I'm away from my computer now, but you can find lots of answers using this method. – Georges D May 18 '16 at 00:13
  • Also using follow path, I am sure there's an option to reverse the curve's direction. – Georges D May 18 '16 at 00:15
  • http://blender.stackexchange.com/questions/510/how-can-i-duplicate-a-mesh-along-a-curve if you use this method, you can slide the object and it's instances along the path usig G, you can move it in both directions. – Georges D May 18 '16 at 00:21
  • I started out trying to use the array and curve modifiers, but it didn't want to work no matter how I fiddled with it. Then I tried using the Follow Path constraint as described in countless tutorials, posts, and manuals. That only allowed me to move one object in an array, destroying the array in the process. I wanted the door to consist of panels that swiveled on the curve, but I'm stuck with having to use a single large panel that can only go one direction. – Anthony Forwood May 19 '16 at 22:10

2 Answers2

8

It all depends on what kind of garage door you are talking about.

You can start with a single plank or slat.

enter image description here

Then add an array modifier to replicate it on the Z axis.

enter image description here

Add a curve with the path you want the door to follow (it's important that the door and the path have their origins on the same place):

enter image description here

On the original plank add a curve modifier and select the curve as guide object:

enter image description here

Move the door up and down on the Z axis, and it will curve following the path.

enter image description here

If you are dealing with a rigid door. Then instead of the curve modifier add a Follow Path constraint. And select the curve as target. Enable "Follow Path", Set "Up" to Y and "Forward" to -Z

enter image description here

Then animate the offset value:

enter image description here

  • Thank you for your explanation. It appears to work for me. The Follow Path constraint doesn't work well with arrays, as I've found out. – Anthony Forwood May 19 '16 at 22:46
  • Unfortunately this doesn't want to work in the BGE, which was my ultimate aim. I used cegaton's method and created two actions, one opening the door and one for closing it. These are controlled by the arrow keys on the keyboard. The door moves but it doesn't follow the path of the curve any more.

    – Anthony Forwood May 20 '16 at 02:58
1
  1. Select your curve. Put more frames in 'Path Animation' and tick 'Follow'.
  2. Select your object. Add 'Follow the Path' in Constraints
  3. Specify curve and hit 'Animate Path' button.

enter image description here enter image description here

UPD: "and then lifts off and heads out into space." -- make sure you don't have any animation moving your object off it's original center position. If you have two or more animations combined, affecting center point of object, it will cause all sorts of strange movement.

UPD2: Door.blend uploaded http://www.pasteall.org/blend/41938