How can I place a skeletal mesh on a level so it starts simulating physics when the game starts?
I dragged a physics asset onto the map, made sure the SimulatePhysics and StartAwake are both true but it doesn’t move. In the level blueprint I called the following functions on it:
None of those made a difference. What am I missing? Everything looks good in phat.
UE4.7.5 binary on Win7 x64.
EDIT: Clarified title, added specs.
The SetSimulatePhysics function has to be called on the Skeletal Mesh Component (even if it has Simulate Physics enabled in default properties). I guess the simplest solution would be deriving a new class from SkeletalMeshActor and setting physics on BeginPlay.
I leave the question unresolved for the time being as the issue could be a bug.
This feels like a bug to me as well. The physics works as expected on the Characters Class but if you create an Actor BP with a SkeletalMesh component the same solution does not work…
Your presented solution of making a new derived component works. It just seems strange that’s the only way to get it to work.
Actually the whole thing was my mistake: In my project there is a feature where the map changes drastically. It’s also called right after starting a game. During that process all physics related actor types get frozen to prevent them from falling out of the map.
When the map changes are done then they get simulation turned back on. Except, as I realized a few weeks after this report, I made a mistake so physics assets were never reactivated after explicitly disabling them.
Sorry that I forgot to post this update.
I’m saying that my solution (turning on simulation on begin play) was a hackfix for a bug I myself introduced. I fixed the root issue and removed the workaround. (Kept the class itself as I ended up needing it anyway.) So you might be looking at a different issue which looks similar but might have a different source. In general I think if the component properties are set up to simulate then it should do that without BP code executing.
I’m still forced to make a new class of SkeletalMesh to get this to work.
Are you saying there is a different solution or that this is expected?