No announcement yet.

God game camera style

  • Filter
  • Time
  • Show
Clear All
new posts

    God game camera style

    Well hello,

    I'm completely new to the Unreal Engine. I played with UDK before but i found it very hard to suit it to the needs of my favorite game genres (RTS, tycoon, god / simulation). It is possible though, i know that .
    Anyway, because i'm learning (i'm a noob) i just want to post a blueprint i made and i hope for some feedback. I want to be on the right track. You can implement everything in many different ways but i want to find the most efficient way. This is what i did:

    I created a blank project.
    In there i created 3 blueprints:
    • RTS_GameMode extends from GameMode
    • RTS_PlayerController extends from PlayerController
    • RTS_Pawn extends from DefaultPawn

    I just tweaked the GameMode blueprint so it loads the PlayerController and Pawn.
    I edited the Input settings of the project to allow moving around and stuff. Nothing fancy yet.

    Now, inside the RTS_Pawn Blueprint added 2 components: A springarm and a camera attached to it.

    I wanted a middlemouse click modifier before the camera is set able to pitch and yaw.
    I want to know if this scheme is ok. I added 2 sequence after the middle mouse button click event so the game wouldnt have to check for middle mouse clicks twice. I don't know if this is the right way.

    The scheme allows the user to look around the pawn (with a arm length (springarm) of 300.0f).

    One more thing: This is working because i enabled "Use Controller View Rotation" inside the CameraBoom component 'camera settings'. But i want the camera to be up and angled towards the pawn at the start of the game. Just like in a normal RTS game. Anyone has a clue on how to do that without losing the controller view rotation? I need that to let the user move around and the camera to yaw around the pawn. If i turn it off moving around is screwed up.. I can't turn it off. But when it is on, the camera is reset just behind the pawn.
    Last edited by Nique; 07-30-2014, 08:19 PM.

    If you are creating a strategy game (click here) like Age Of Empires or Rise Of Legends then the current camera setup you have wont work. What i did is i have a separate Camera Blueprint that i view through which has WASD movement and rotation in Tick event and i set the variables through PlayerController Blueprint class.
    Support my RTS Game (Agora) on Patreon!
    Unreal Nexus - Create Share and Experience!
    Unreal Engine 4 World-Wide User Map

    [PLUGIN] Aws Gamelift Client Plugin
    [TOOL] Create your own binary release of UE4 from GitHub source
    My UE4 Tutorials and Misc Tools

    Lead Programmer at YetiTech Studios
    Your Friendly Neighborhood
    Satheesh PV (a.k.a RyanJon2040) | Twitter, Instagram, Facebook, LinkedIn, YouTube, Google+


      Yes it's a city builder game.

      So essentially you made a 'look at target' camera? The camera always looks at the target (pawn) no matter what position it is in the real world?
      I wonder how to archive such result in Blueprint. I know there is a 'find look at rotation' math function in Blueprint.


        I did a tutorial for an RTS style camera move (with edge scrolling) Check it out here: RTS Style Camera Movement

        I believe it might be what your looking for. The controls can easily be changed and doesn't use the player rotation but still allows you to pivot around a central point. If there's any bits you would like me to explain some more let me know.
        Check out my pet project: Salvos - Maze Survival

        Looking for blueprint tutorials? Then visit my blog or YouTube channel.
        Blog: voxagon Youtube: Click


          Thank you, i will take a look at it.