Train animation

hi everyone,

im trying to make a simple train with an arrayed cube and a bezier curve

i parented them and used a track-to constraint, but now the array doesnt point in the right direction.

http://img502.imageshack.us/img502/9168/trainhc6.jpg

how can i make every curve nicely follow the one in front of him, as it goes in a real train?

i saw a youtube video on how to do this a few weeks ago but its gone now…

tnx in advance

anyone? :spin:

You can’t use the arrary modifier with a curve deform modifier(well you could, but that would distort the individual train cars) or like you are doing, by using the track to constraint … the only reliable method is a bit involved …

Here is the original post by jugglerjuggler and his blend example : http://blenderartists.org/forum/showthread.php?t=106676

And my attempt to explain his method in English (jugglerjuggler is a German speaker) : http://blenderartists.org/forum/showthread.php?t=122214 … I think might have another post with my own version of the method and a blend file, but i couldn’t find it myself … Oh here : http://blenderartists.org/forum/showthread.php?t=123979

This method will just as well for ground hugging trains as well as for roller coasters …

I know this is an old discussion but I need help with a simple version of what was achieved there.
I was trying to work off an existing file someone has posted during the past discussions but I wanted to swap out the path for my own. That totally wrecked things and I’m not sure how to fix this.
My .blend is attached. If you’d be kind enough to see what I am missing there to make it work…

Thanks

Attachments

motion.blend (443 KB)

I’m not sure what you did with your curve but I removed it and added a new one. Then, with the plane selected you just have to add a curve modifier; make sure the object centres of the plane and curve are in the same place. Movement of the train is accomplished by moving the plane along the X-axis.

I can’t seem to upload the blend file at the moment.

did you add a curve or a path?
mine was a path, could that be the reason?
i do have to look into the centers alignment though…

well I did it form scratch this time
and while it seems to be working, the cubes are getting distorted (so is the plane probably)
how do I fix that?

file attached

Attachments

motion2.blend (138 KB)

I’m not sure what the exact problem is with your set-up but it should work. I would use a 3D bezier curve instead of a Path, apply the scale to your objects (Ctrl-A) before parenting and use individual cubes as your carriages instead of the multi-user mesh objects you have now.

I remade this again.
I only have one cube there and it’s been scaled prior to parenting to the vertices.
Still this is how my cube gets distorted when the plane is attached to the path.

Attachments



This works.

Attachments

motion2rev.blend (141 KB)

yes it does
thanks so much

i’m curious if and what have you changed in it to make it work?
btw is the step where I select the plane and the path, hit ctrl-P and select Follow Path needed?

i’m curious if and what have you changed in it to make it work?

Basically what I said in my previous post. Perhaps you should try changing individual things and see what results you get.

btw is the step where I select the plane and the path, hit ctrl-P and select Follow Path needed?

No