Jump to content
FR3D

Train wagon realistic position relative to curvature

Recommended Posts

I manage to find a realistic way to position a train properly on a track. (see file attached)

Wagon cannot simply be copied on an animated point on a curve as the centre is offset-ed in turns realistically.

A path deformer is out of the question because of the deforming geometry

 

This is my solution.

 

1) I created a 2 point line for each wagon

2) I path deformed the result

3) created a single point for each of those deformed line to copy each wagon onto, with proper vector for the wagon alignement

 

I feel it is very complicated and i am curious for a better solution.

If anyone interested to give his input.

train-system.jpg

train_realistic_track.hip

Share this post


Link to post
Share on other sites

Here's a quick approach I came up with.

It assumes all carriages are the same length. I also measure carriage length along the curve, rather than in world space, so it becomes more inaccurate the less straight the track. This should do fine for most purposes, but if I find the time I'll see if I can implement a more accurate measure.

 

train_align_v001.jpg

train_align_v001.hiplc

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×