Hi I am trying to make a game with a similar camera to captain toad’s treasure tracker. I want my camera to stay centered at the root of the level and be able to receive input from the player to rotate around the level. I also am trying to have the player be able to move at the same time. To my understanding, there is not an easy way to do these at the same time. Can anyone help?
It is easy, just some coding needed.
Watch tutorials about “custom pawn blueprints”
use unreal “top down” template as starting point.
Then add rotating for camera with some keys/action input.
then add volumes and trigger camera actions from level
or maybe do automatic camera that rotates when you close to map edge etc.
The custom pawn blueprints made sense! It’s a little extra work but it does work. I was trying to incorporate the third person character controller into everything.
Since a lot of people are confused with what goes where (because it was designed that way in unreal):
-
level blueprints, it is quite limited (hard to get references of other things from it, or more like it can be confusing because of load order), also when you load new level you do not get code transferred from old one. So only keep code that is level specific.
-
game mode, game state - persistent actors that survive load level, place all game logic there (like changing levels, some player attributes you want be sure survive whole game etc.) Great place for all kind of dispatchers, because everything can easily reference it.
-
player controller - you have only one, it should read all input, and tell player pawn what to do. This way you can have single pawn, that can be run by player controller or AI controller. So same logic for both player and NPCs. For eg. same logic to swap parts of body and make different outfits etc. Or handling guns, triggers.
-
Player pawn - avatar with camera that is handled by player controller
-
HUD - for simple game place UMG/widgets in player controller, but with complicated stuff its nice to split that code into HUD (for widgets) and into player controller.
And that is about all for most basic thing, and what should go where. Singleplayer, because multi changes some things, not everything is present on client or on server.
ps. there is nice page about it, in unreal documentation, but i could not find it.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.