Hey everyone,
UE4 noob over here, so i’m not sure if this is intended behavior or indeed a bug. Feel free to correct me.
I’ve got this “bug” right now on UE 4.9.1.
I’m working on a simple platformer game based on the endless runner blueprint tutorial.
I’d like to have the tiles fall down after my character crosses them. But I don’t want them to fall if the character hasn’t touched them yet.
My tiles are a blueprint with 2 components : a destructible mesh, and a box collider.
Here’s what I found with my testing :
Test 1
- Simulate physics (mesh) : on by default
- Enable gravity (mesh) : on by default
Result : tiles fall down as soon as I start the game. That’s normal.
Test 2
- Simulate physics (mesh) : on by default
- Enable gravity (mesh) : off by default
Result : Tiles stay where they are, and when the character lands on them, they both fall. Again, normal.
Test 3
- Simulate physics (mesh) : off by default
- Enable gravity (mesh) : on by default
- onBeginOverlapEvent (BoxTrigger) : set simulate physics (mesh) on + set enable gravity (mesh) on
Result : The tiles won’t move. I’m sure the event is triggered (I have them destroy themselves after 2 seconds after physics has been turned on, and they do destroy themselves). Its like physics refuses to activate.
Wether the gravity is on or off by default doesn’t change anything.
Test 4
After testing a bit more, I’ve found this :
- Simulate physics (mesh) : on by default
- In the construction sprint : set simulate physics (mesh) off.
- onBeginOverlapEvent (BoxTrigger) : set simualte physics (mesh) on + set enable gravity (mesh) on
Result : That works. When the character touches a tile, physics is correctly activated, and everything behaves correctly.
Conclusion
So basically, physics simulation won’t activate properly unless my blueprint starts with physics simulation enabled, to have it immediately disabled in the construction sprint, and reactivated when needed.
So, is that a bug or normal behaviour?
(And if it’s not a bug, why does it work like that?)