Physics based train

T

t_fleetham

Guest
i am trying to make a train using a two train model's from hl2, i have been trying to make it go along a track using the func_tracktrain entity with the train model a prop_dynamic and paranted to the func_tracktrain entity.
The only problem was that the train didnt bend in between the two carriges. it just turned a lot faster at the back when it went around corners, i put linier blend on for when it turns.
Im trying to work out a soulution but have got stuck, i also need the player to be able to ride along the top of the train. could anyone please help.
 
I have been thinking about doing something similar and the same issue has been stopping me.

You could try making the engine into a func_tracktrain and the carriages behind it into physic props. Then join them with a phys_hinge (or some other "binding" entity). Not sure if it would work but it's worth a shot.
 
im trying to get 4 tracktrains entity's where the wheels are ment to be, then pivoting them to two physboxes which act as the carriges which are paranted to the train modal, with a pivot in between the two physboxes. but you cant ride ontop of the modal which is a prop dynamic. so ive extended the tracktrain boxes to just above the train modal so you can walk along the top of the train. the propblem with your idea is that the carrides will just drag along the ground, if your using a texture for the tracks anyway, like me.
 
Not sure how much of a help this'll be, but check out dm_subwayv1. It has a train/subway that you can ride in and on top of...no bends though.
 
yea, thats my problem. i've already created a train which you can ride on top of, that was the easy part, but the bends are when i get the problems.
 
http://up2.fastuploads.com/traintest.rar
this is a link to my test map for the train. if anyone could please help, it would be greatly appriciated. the train works as long as you only have one node for it to travle to. if you put another node in it will not work at all. i cant work out wat the problem is. thanks to anyone who solves it.
 
Well, your train doesnt seem to work at all, when I tried the map, and I dont see any corners on the track. What exactly is the problem with it ?
 
When I played it, and moved forward, the train moved about a centimetre and then stopped. That's all it would do.
 
there wasnt any corners on the map cos thats the one thats ment to work. but if you add a corner it dosn't. o well, i think i'll just stick with a straight track.
 
Yeh, what I'm saying though, is that when I played your map, no matter what I tried, it wouldn't move. But yeh, straight tracks are easier for trains.
 
Back
Top