I recently solved a problem with my projectile when following a tutorial, but I came across another issue. Whenever I go into PIE mode, several weird things happen:
- I̶ ̶c̶a̶n̶n̶o̶t̶ ̶s̶h̶o̶o̶t̶ I managed to fix this.
- The skeletal mesh stays in place no matter where I move
- The character that I possess can collide with the skeletal mesh
- the message “We are using FPSCharacter” appears twice
It appears as if there are two characters in the world, one with movement and the FPSMesh and the other with the skeletal mesh a̶n̶d̶ ̶p̶o̶s̶s̶i̶b̶l̶y̶ ̶t̶h̶e̶ ̶a̶b̶i̶l̶i̶t̶y̶ ̶t̶o̶ ̶s̶h̶o̶o̶t̶(again, this is fixed). However, only one character appears in the World Outliner(two if I enter PIE mode). If I delete the one I can see, I cannot posses the one with the skeletal mesh. Can anyone tell me how to fix this?
Note: While I was experimenting, I deleted the BP_FPSCharacter(even though I wasn’t supposed to) and tried to bring it back. T̶h̶i̶s̶ ̶m̶i̶g̶h̶t̶ ̶b̶e̶ ̶w̶h̶a̶t̶ ̶c̶a̶u̶s̶e̶d̶ ̶t̶h̶e̶ ̶p̶r̶o̶b̶l̶e̶m̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶I̶ ̶w̶a̶s̶ ̶w̶a̶r̶n̶e̶d̶ ̶t̶h̶a̶t̶ ̶a̶n̶o̶t̶h̶e̶r̶ ̶f̶i̶l̶e̶ ̶r̶e̶f̶e̶r̶e̶n̶c̶e̶d̶ ̶i̶t̶.̶ After trying to redo the project, this no longer seems like this is the case.
A coupple of things to check:
- In the World Settings, is your FirstPerson Player Controller and Pawn set
- Do you have a Character in your map before play and when you hit play is yet another character spawned (you can check this in your level contents list)
- Do you have player start setup and OnPostLogin are you creating a Pawn and Possessing it with your Player controller?
1)I tried setting GameMode Override to BP_FPSProjectGameModeBase and setting the default pawn class to BP_FPSCharacter. When I went into PIE mode, nothing happened. 2) After looking in the World Outliner, I saw that I have one character before I hit play and two when I’m in PIE mode. Also, in the World Outliner, the second character that appears has orange text instead of the normal white text. 3) After doing a bit of research, I think OnPostLogin is a blueprint node. Please note that I am following a C++ tutorial.
The solution I found was very simple: Delete the character from the level. It turns out that the tutorial said nothing about putting one in there in the first place. This might have to do with the fact that the character is the default pawn class for the game mode. This leads me to believe that it spawns it as soon as the game starts. I must have put a character in the level by mistake after I deleted BP_FPSCharacter and brought it back. Sorry if this has caused anyone any trouble.