Crash by playing in GameMode with PlayerController (C++)
Hey Guys, my problem is... ... when I whould like to play my game, my editor crashs. I have an standard GameMode, but with a custom PlayerController. Compiling works.
Can anybody help me?
asked Jul 22 '16 at 08:51 AM in C++ Programming
If you have BSP on your level, then the cause may be in 28 and 29 line of code of your PlayerControll.cpp file.
In line 28 you assume, that whenever you hit anything, it's already an actor, which is wrong. BSP for example isn't a an actor (thus hit.GetActor() returns nullptr), yet it could be detected by your linetrace. I'm not sure if there are any other objects like BSP that would block linetrace despite the fact they aren't actual actors.
Anyway, to fix this you could replace your condition in 28th line to this:
Follow this question
Once you sign in you will be able to subscribe for any updates here