excellent help, thank you.
Let me clarify:
- My spaceship mesh is the root component of the Spaceship blueprint
- The shield is a child component of the spaceship mesh root component
This I choose because certain functions become easier.
For example if I use “get actor location”, I used to get the right location for certain objects only if the root is the static mesh.
For some other objects is seems to work fine. I still have to wrap my head around this side issue.
I switched to “post update work” as you suggested, just for safety.
I did not change the iterations of the solver. This looks very resource intensive it probably would break the game performance, if replicated on many objects.
In parallel, I found a solution which seems to be working fine!
I found this article: Some Tips to Using Physics in Unreal Engine 4 - bright developers
Here they explain that, when using physics, you must ignore all collisions.
Sounds crazy, but actually it seems that the physics engine will take care of collisions by itself.
Once I switched the collision off, there were no more collisions between spaceship root mesh and shield child mesh.
I tested then with two objects: an asteroid from a blueprint with physics enabled and a simple sphere with physics enabled.
The asteroids collides with the shield and bounces away as it should.
Regarding the sphere…there’s no collision, although I enabled its physics.
I will now have to find out why the sphere doesn’t work and how to fix it.
But hey, the original issue is solved and now I have a smaller one which seems surely solvable
Edit: by clicking repeatedly on “simulate physics” and “simulate hit events” I managed to convince the sphere to participate to the physics simulation xD
Not sure what was the problem. I will likely create a general blueprint for planets to make sure they always have the same physics parameters, then switch between textures with an index, or something like that