Trains in Tf2

  • If you're asking a question make sure to set the thread type to be a question!

pennsyrail

L2: Junior Member
May 12, 2016
62
6
Hello again,
I'm sorry I continually post, but it's not like you pros have anything better to do :)
I just saw that someone came out with a curved track pack (modular as they call it) for the large trains. I was thinking about doing an experiment with them and that is trying to get a train to follow curved tracks. This will involve some compley experimenting, but the first question before I dig in is if u can make a tank train with a pivot on each end. Instead of rotating on the center, it would have two points that follow the track making it curve more softly . Later I want to try making an independent set of bogies that move under the two point tanktrain. Any suggestions or comments on my audacity?
Thanks and happy mapping,
Dante
 

Attachments

  • train.png
    train.png
    11.7 KB · Views: 169

Sor

L2: Junior Member
Jul 29, 2016
87
8
That´s what "Distance between wheels" does for an example how this looks look at pl_frontier´s train.
 

pennsyrail

L2: Junior Member
May 12, 2016
62
6
Grazie Signore! I'll be working on this later, so hopefully I can view this phenomenon then. You can actually tell where the wheels will be in regards to the track? Hopefully it doesn't just swivel...
 

Yabayabayaba

L5: Dapper Member
Jun 2, 2016
243
77
could you use 2 track trains with pivots on them that hold either end of a train car? like actual bogies? you could use phys constraints, but can those attatch to an entity anywhere besides the origin, because you would need one at either end. to that end if you could only phys restrain around an entities parent, could you parent 2 phys objects to echother to create one with two origins (without causing explosions?). I shall read on this and get back to you latter, because this would be awesome, I have tried and making curved trains look good is really hard.

P.S. if anyone knows a good way of making curved trains can there be a tutorial for it? Thanks!
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
Getting the physics engine involved is asking for trouble and parenting an object to a front and back doesn't work in the engine or mathematically, even. Your best bet is to fiddle with the wheel distance values until it looks right.

Each car on the train needs to be its own tracktrain. As long as they all start and stop together, they should maintain the appropriate distance from one another, provided you spawn them in appropriately.
 

pennsyrail

L2: Junior Member
May 12, 2016
62
6
That's kind of the Idea. I think I figured out a way to get it working, though I'll need to separate the trucks from the body of the engine or car. It involves creating a path for each bogie and a separate one for the train body/chassis. It worked using a pallet as a bogie and an overturned flat car. Until I can get separated models, that is the state of things. I am going to do some syncing tonight to try and better align the trucks with the body rotation. I'll post a video of the whole shindig later tonight. Stay tuned and thanks for all the help! It will be a great step for tf2 and a giant leap for hammerkind.
 

Yabayabayaba

L5: Dapper Member
Jun 2, 2016
243
77
have setup path_tracks to the center of the bogies (on valve train models) lines up with the center of the track, but I can't get the settings right. change near path track looks best, but causes a skewing of the train, pulling the wheels way off the tracks. If i set it to linear blend, or ease in/out the wheels almost on the rails (as close as mathematically possible without making new models) but the train jitters as it turns. I am trying to make a prefab pack with the path_tracks lined up correctly, and I want to include the correct settings, any ideas?
 

pennsyrail

L2: Junior Member
May 12, 2016
62
6
Are u doing a long curve? The only time I messes with linear blend it sent the train spinning off the rails. I think separate models for boogies or an overhaul for the train system is in order. Just try it with pallets as trucks and the flat car above on different path tracks. Also, if u cover the tracks in grass it may disguise the off track wheels
 

Yabayabayaba

L5: Dapper Member
Jun 2, 2016
243
77
I am using a circle of the largest circle available in the a fore mentioned track pack, about 2000 hu in diameter. The issue is I am trying to make a system that works with the current models, and the body of the train. Even if we had separate bogies you would still need separate path_tracks for the body of the train, as its center hangs off the edge of the track during sharp turns.