Train skeletal mesh replacement breaks derailment and coupling
This is a very odd one.
I'm using an SCS hook to add a component to trains that simply changes the skeletal mesh the skeletal mesh component (M Mesh) on the locomotive to a custom one.
The custom skeletal mesh has the exact same setup as the original (as far as I can tell), other than one additional material, and a slightly modified mesh. It also uses the exact same skeleton as the original (not newly imported, it actually points towards the original skeleton)
Animations and all that work fine, but when a new locomotive is placed, no new freight cars can be coupled, and train derailments (the locomotives just stop dead)
I'm currently under the assumption it's something to do with how the skeletal mesh is used by coupling and derailments in the original locomotive BP, but that's pretty much all I have right now.
The train BP is mostly C++, which I'm not too familiar with, so if someone here knows how the code for trains works, your help would be highly appreciated.
Solution:Jump to solution
I see it in the files, but not in the project. It might be there in a full dump though
20 Replies
If you swap the mesh back to the original one after X seconds, can you couple freight cars again?
Good idea, I'll try that
Idk about the coupling, but the derailment issue might have something to do with the physics asset. Does it show up in your new skeletal mesh asset, because it seems to be missing from the project.
That might be it then
I assumed it needed to have one, but there wasn't one in the project
Oh, physics asset. You might need to make a placeholder
Solution
I see it in the files, but not in the project. It might be there in a full dump though
I don't think the Asset Dumper can do physics assets
I'll try making a placeholder and generating one
It probably needs that to do its crash thing
Worth a try
100%
Actually no need to generate one
I'll make the placeholder, and point to it
You don't need the full asset if you can just reference it, yes
Completely forgot about the physics asset in Fmodel
I've been able to reference a base game Wwise
AkEvent
by making an empty asset with the right name in the right pathI just imported the glb for the locomotive again, which auto generated a physics asset.
Then I just named it the right thing and put it in the right place, since the placeholders don't get touched anyway
Let's see if this works
no lol
Oh wait, Fmodel was still open
Yeah, FModel is annoying and loads mod files :REEEE:
(left some debug code in, removed it, testing now)
Yeah, that was it
Good to know that now 100% of the files are in the placeholders
Thanks for both of your help
Did that fix the coupling issue as well?
Yep
I'm assuming the coupling uses the physics asset to find the bounding box of the train
cool, i thought that might be a missing socket problem, but glad it's fixed. 👍
Coupling worked fine on trains that existed before, but when I tried attaching stuff to the locomotive, the freight car hologram just passed straight through
So it must be figuring out where on the rail it can place the trains using the physics asset