Search code examples
unreal-engine4

pawn gravity with child actor componets


I've created the following hirerachy in a pawn blueprint

enter image description here

The three ChildActorComponenets (Body, Turret, Barrel) provide all the meshes to the pawn.

The root is a StaticMesh, I placed it there so I could apply gravity to the pawn - In order to simulate gravity the root static mesh requires a mesh object (cube in my case) which is placed automaticly in the center child actor component. The collision that's created between the child actor component makes the pawn act irradicly (twisting and rolling toward infinity).

To sum up, in order to apply gravity it seems a root static mesh is required, how do I make it work with the child componenets?


Solution

  • You could just disable static mesh collisions. In order to do that select StaticMesh component and go to "Details" tab, under "Collision" settings set "Collision Preset" box to "NoCollsion". (Physics collision needs to be enabled in order to maintain gravity in pshysic smulation).

    Alternatively you could make your custom collision preset so root static mesh will be colliding with all other world's objects, but no with your child actors