Copy Complex Collision from Static Mesh Into Physics Asset, then Sperate Collision for Independent Wheel Rotation

Hi ,

A big side project from my main project and I could use some help in what I consider to be a relatively intermediate task: I wish to set up train physics.

Using this video as a guide: UE4 physics-based train on rails - Part 1 - over 60km/h - YouTube

Notice they have the wheels and cart as separate assets which they then add collision shapes to and attach via components within a blueprint.

My train is a marketplace asset and more complex as the wheels come packaged with the train:


(In the picture above I am also showing the complex collision)

I then stumbled across this video and thought that was a great way to quickly add PHAT, (I have not played with physics much).

2 Things:

1). Why is the “Copy collision from static mesh” not working like in the second video:

2). If I can use the complex collision as physics collision, is there a way to separate the wheels so that I can identify those separately for rail interaction? If not, I am fine with creating separate collision spheres, however, the skeleton has the AXIS defined as the wheels, not the wheels themselves and I am unsure how that would affect other facades of the train, animation etc…

Any help is much appreciated! I know I am taking a big bite here.

Hey there @anonymous_user_3cf2ac1c! So your setup is going to be a bit different than theirs due to your pieces already being set up and linked. Are you trying to create a physically simulated accurate train? Or is this for a game where the train will actually remain on the tracks?

For the PHAT, it’s going to generate poorly as all of the pieces are quite close to each other. It’s recommended if you want to go physical, you’ll want to create the volumes manually.

, yes I am hoping for a physically simulated train that can fall off the tracks however I have yet to dive deep into this so it’s not mandatory at this time.

if I make it manually I can only think of putting invisible blocks infornt of the current wheels and make new ones. But that would break any animations.

Would “locked” physics be as simple as locking each cart’s x-plane to the track’s?

Thanks again for the help!

It’s a bit more complicated than that but the general idea is right. If you need train tracks and a train you can have full control over you could use a spline and more or less track the carts to it. However if you’re trying to crash the train and have it physically simulated you’ll have to do something a bit like the video from before, but to do that you’d need to create the PHAT yourself and really tweak it. I wish I had better resources for this specifically.

Gotcha that makes sense. Thanks!