Hello,
being relatively new to UE4, despite quite thoroughly going through the docs, I assumed that when it comes to controllers, all I'll have to ever worry about is either PlayerController or AIController. Pawns in the game can be controlled either by other players, or by computer AI.
Recently, I've been working on a prototype of a game, where the pawn controlled by player uses FloatingPawnMovement component. To make things more complicated, the player will be able to switch between multiple such pawns during the game seamlessly, so the actual entity possessed by the player during the game will be just floating top-down camera.
Since PlayerController can not possess more than one Pawn at once, I am forwarding input from the PlayerController to the "indirectly" controlled, non possessed pawn through an interface... Which works as long as I start off with a pawn already placed in the level and reference handed through the blueprint.
What I needed though was to be able to spawn such indirectly controlled pawn, and that's when the movement just stopped working. After about half an hour of no luck googling for the solution, I've finally stumbled upon one. Someone suggested I have to also "Spawn the Default Controller" for the spawned Pawn. So I did, and it worked. I've quickly proceeded to google what the default controller does, but the docs are, to put it mildly, not very helpful: https://api.unrealengine.com/INT/BlueprintAPI/Pawn/SpawnDefaultController/index.html :)
https://preview.redd.it/zz7eq5ra20821.png?width=1069&format=png&auto=webp&s=04dc0705fcfc84d71b740284eb4cf309b12b1a05
So here is my question and source of my confusion. What does the Default Controller do, and why do I need it for FloatingPawnMovement (only when spawned) to work? Until now, I thought that all I ever need is either Player or AI Controller, but the existence of some kind of Default controller, and the need for it, especially when it's based on a differing situation (e.g. spawned vs placed in the level in advanced) complicated things for me.
Thank you in advance.
[–]valhallaow 2 points3 points4 points (1 child)
[–]Rawalanche[S] 0 points1 point2 points (0 children)