Download

Child meshes somehow retaining or storing collision information?

I am experiencing something a little strange with regard to the physics aspect of UE4.

There are objects in my game which I want to explode upon contact with a projectile. Destructible meshes would normally be a good solution. However, I am targeting Android.

One cannot use destructible meshes in Android builds because of performance issues. So I created my own version of a destructible mesh by attaching smaller pieces of the parent mesh to the parent mesh.

Upon contact with a projectile the parent mesh disappears, and the smaller, child pieces fly away.

I do this with a combination of add impulse, also the impulse added by the projectile, and also the physics of the smaller child objects colliding with each other, and also the settings of the various pieces in the details panel.

Physics also acts strange in Android. I don’t quite understand it, but some of the physics in my blueprint simply do not work or work differently when I actually use them on my android device. So to get a good explosive effect I created a flow which relies a little more on the physics imparted on the objects by the projectile, and the settings of each mesh in the details panel, rather than the blueprint code.

However, when I use this method something strange happens. I notice when I push the large, parent mesh around the ground before I hit it with a projectile so it explodes, the energy or values of the collisions imparted by pushing the object on the ground sort of collect and are stored in all the child meshes. The end result is the parent mesh is pushed around a lot, and then explodes, the child meshes fly out at a million miles an hour. The more I push the parent mesh, the faster the child pieces fly out when the projectile hits.

I have not examined the C++ code behind UE4 much, I am a novice programmer, so I don’t really know what’s going on. I am just curious if anyone else has ever experienced this.

Thank you for your time.