Jump to content

Train wagon realistic position relative to curvature


FR3D

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

Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...