Correctly Creating and Auto-Possessing Pawn Blueprint from C++ Base-Class
Hello everyone, I'm trying to experiment a bit with the ue4 basics and started facing some odd behavior upon instancing a blueprint, that was derived from a c++ base class. The instanced ACameraPawn of the blueprint I created, does not get correctly possessed upon game start.
The short version: Why is the blueprint instance of my pawn not correctly possessed upon game start and why does it work for the c++ instance?
The long version: I created a c++ class derived from APawn, added a few movement functions as shown in online tutorials, and specified the following constructor:
If I now drop an instance of the ACameraPawn class into the viewport, it works as expected. Upon game start the Pawn gets possessed and he can be controlled through player input.
Now I create a blueprint based on the ACameraPawn. Without changing or doing anything else I drop an instance of the created blueprint into the viewport. But no matter how many times I press play, the camera gets centered to 0,0,0 and it's not possible to move the camera. Meaning the pawn changed his position and does not react to player input.
Oddly enough, if I hit play, select the camera pawn instance in the world outline, stop and then hit play again, the pawn gets possessed and can be controlled exactly the same way as if I dropped a c++ instance instead of the blueprint instance.
asked Oct 06 '15 at 03:26 PM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here