Code a First-Person Adventure Game Documentation wrong mesh position

In the getting started documentation, (Code a First-Person Adventure Game path / Add a First-Person Camera, Mesh, and Animation), the positioning of skeletal meshes are wrong.

Two problems :

  • Comparing to BP_FirstPersonCharacter Mesh transform is not set
  • SetupAttachment to head socket in constructor does not work. (Perhaps because skeletal Mesh is not set at this time.

Here the result :

To fix the socket problem, I need to unparent/reparent my blueprint to the c++, it seems there is a refresh bug here. Should mentioned in the documentation.

hi , you can take a reference from if you’r interested here

Other problems :

  • This need a if != nullptr to avoid a crash when anim has not been set in blueprint :
    // Set the animations on the first person mesh. FirstPersonMeshComponent->SetAnimInstanceClass(FirstPersonDefaultAnim->GeneratedClass);
  • This is wrong because it cast a shadow :
    Because your third-person mesh is hidden when the game begins, you only need to set animations on the first-person mesh.