Which component should simulate physics?

For StaticMeshActors, the physics settings seem to be shared between the root component and the static mesh component. For example, if I place a static mesh actor with SM_Chair as the static mesh component, and go to its details tab, physics section, checking or unchecking ‘simulate physics’ or changing the mass affects both the root and mesh component physics settings.

The blueprint I’ve made for the default pawn is different. The root component (which inherits from DefaultPawn) has no physics settings. The child CollisionComponent does have physics settings, which is where I simulate physics, set the pawn mass, and constrain rotation along all three axes to prevent the “rolling bug”.

However, the CollisionComponent has a child MeshComponent (of type StaticMeshComponent), which has separate physics settings, including a different mass. Checking and unchecking simulate physics in the CollisionComponent does not affect whether the MeshComponent simulates physics. And, when triggering a PressurePlate (of type TriggerVolume) I can see that the PressurePlate registers the mass of the pawn as the sum of the two masses (pawn mass = CollisionComponent mass + MeshComponent mass).

I can fix the “mass bug” by checking simulate physics on both the pawn’s CollisionComponent and MeshComponent, but then my camera position is changed (I have no idea why) and the CollisionComponent no longer rolls (even without constraining rotation)!

This leaves me very confused, and with at least two questions:

  1. Why does the Pawn have a CollisionComponent and MeshComponent, while the StaticMeshActors (such as those derived from SM_Chair) have only a MeshComponent, and no CollisionComponent?
  2. When an Actor has both a Collision and Mesh Component, which one should simulate physics, which one shouldn’t, and why? Which one should have mass, which one shouldn’t, and why?

Any other information that could help clear up my confusion would be much appreciated.

2 Likes

Privacy & Terms