Download

Runtime change staticMesh of UStaticMeshComponent, collision problem

Hi.
I have an actor with added collisionComponent which is UBoxComponent, and UStaticMeshComponent. Everything is working great with that actor(physics, collisions, mesh visibility) until I change in runtime the staticMesh of UStaticMeshComponent of that actor by calling setStaticMesh. Immediately that actor is starting to fall down through all game like he is ignoring all the collisions from collisionComponent. However I can see that staticMesh has changed properly to deserved one. I tried to call different kind of update functions on both of these components and even settings all properties of these components again to the same, but nothing helps me. Maybe you know what is the reason of this problem?