Download

Railway engine pulling bogies on a splinemesh track with pure physics

I’m trying to create a railway system with pure physics for my game. I have a bogie as a static mesh with sockets for the wheels. They move as force is acted upon. The engine is a skeletal mesh and a blueprint of the same inherits from wheeled vehicle (also uses animation blueprints, wheel & tire data and a physics asset). Using this method, the wheels of the engine don’t have any collision and they sink through the landscape component.

Me Too!

Looks like you have quite a head start on me, so maybe I could glean a bit of information. :wink:

I am looking to get a loco into Unreal, but I’m not even sure how I should proceed in getting the unit into the editor. This will be an advanced vehicle, with hundreds of moving player interactive parts. It will eventually be ported to DTGs Train Sim World. Since I know so little, for now i have settled for importing meshes and animated parts, attaching them in a hierarchal order, and adjusting materials. Any advice you can give will be greatly appreciated.

6b9f3e4d6dd4f4c166f0bd052bef03772be93c96.jpeg



Hi,

I managed to get it running using angular motors and physics constraints. However, I’m getting bounciness at high speeds. I managed to reduce it using friction but doesn’t look like a full-proof solution. When I adjust the strength of the angular motor to be too high, the wheels start going haywire even with the constraints.

For the bounciness issue, it’s towards the end of this gif…

Railphy.gif

Hi all,

This Train and Rail system might be of interest to you: https://forums.unrealengine.com/showthread.php?139109-Train-and-Rail-System

While it’s not ‘pure’ physics, it does use accurate physics calculation for speed, taking mass, acceleration, friction and the incline the carriage is currently on into account.
Hope it’s of some interest or use to you for your project.

Thanks,
PJ Team