Download

Converting the top down camera to rpg style camera?

I’m still a complete newbie with ue4 so all I can do really at this point is to follow simple tutorials and then add edits to them. With that in mind what I’m looking to change the top down example that comes with the editor so that I can move the camera separately from the character. As for example if you know shadowrun then that’s the kind of camera I’d want (original fallouts 1&2, underrail, wasteland 2…).

But honestly I don’t have any idea how to do it. I’m not asking full detailed steps. I’d be happy to get some basic pointers and names of some blueprint items I’d need for it. Like what items (are the graph items called items?) should I use to get mouse position on the screen or (eventually) how to limit the view movement so you can’t move the camera miles away from the character. Is using the springarm good idea for controlling the camera location or should the camera work just well on its own? Should I write the graphs for the movement functions inside the character or inside the camera blueprint? How do you connect those two?

If you want more precise list of what I want I’ve written it below. Some super basic things I’ve managed to do:
[spoiler]

  • view can be be rotated around z-axis (done)
  • view can be zoomed by moving vertically (done)
  • making the zoom smoother. I’ve tried to add lag but I don’t get any smoothness for the zoom, only for rotation.
  • view moves in x/y directions when player moves mouse cursor on the edges of the screen.
  • view can also moved with wasd buttons
  • view can not move too far away from character
  • when character is moving and the camera view limit is reached the camera moves with the character so character-camera max distance is not exceeded. Or alternative solution.[/spoiler]

Also I imagine I’d need to separate the camera from my character for this. But everytime I try this I just get a camera that I can not move in any way. It doesn’t respond to any buttons which I imagine has something to do with communications between blueprints. I’ve tried doing some rts tutorials but because my player is the character and not the camera (so to speak) there are some fundamental differences that I can’t solve.

Any help appreciated.

Here is what I have so far: http://imgur.com/a/UU3vp

This is what I get:

Camera BP nodes:

Camera spring arm settings:

Camera control in character BP:

(I started with the topdown example and removed all the camera stuff from the default BP, then removed the cameras and camera spring arms from the player. How do I set the new camera to… active?)

Camera control nodes in character graph:

and

(also included is the variables and the folder tree)

Casting in camera graph:

All this is just on top of the topdown example that comes with ue4.

How do I get control of the new camera I placed in the map?
Why odes the camera still follow the character?

I know I’m probably asking something really dumb and simple. All I need is a kick in the right direction. Please?

I’m not too familiar with the Top Down Template, but I’ve done some Third Person stuff, where I added a second camera and connected an input (Assigned to TAB) to a “Toggle Active” node. When I added three cameras things didn’t work so well, but almost. Maybe that node can work for you, I don’t know. Sorry I couldn’t be of more help… I’m just waking up.

Hey, I’m not entirely sure what exactly you mean by “RPG camera;” I’m assuming a third person camera maybe, but here are a couple tutorials from YouTube that may help.

Change Player/Character ~ https://www.youtube.com/watch?v=EsOk-tERCaQ

Toggle Camera ~ https://www.youtube.com/watch?v=haA6vYgbEw0

There some other tutorials on changing the camera, with float clamps and other features… you can search for those and I’m sure they’ll help you out.

Rpg camera is something that is not attached to the character. So you can move the camera independently (north/south/east/west) from the character. So if your character moves the camera doesn’t. Like this: Let's Play Shadowrun : Dragonfall - Episode 15 - Cool Ghouls - YouTube

Your examples are great but in both of those the camera is on the character. Or there are just multiple characters which all have their own camera attached to them. I have the camera as separate because my understanding is that it needs to be so. But my issue is that I can’t set up any kind of links to that camera inside my character blueprint. I know how to move the camera and control it when it is on the character. But if I try to use a separate camera pawn (again I’d guess this is the way to do it?) I can’t even get control of it. The game doesn’t even use the camera, instead it uses some weird 3rd person camera that is attached to the player waist (some default camera view when the game doesn’t find a camera in the nodes?).

So the way I have done it is that I have separate camera bp that I dropped on my level. If you add the camera on the character using camera boom or springarm then it follows the character and I don’t think there is a way to move the camera separately

I tried this but I can’t figure out how to attach the “get camera” to the “new view target” of that “set view target with blend” node. I’m not sure if that node is even something I should be using.

The float clamp is something I can do (when I have control of the camera). Once I have control of the camera I know how to make it move. I just need to figure out the node that gives me control of the camera. Or something like that.

So for clarity here is what I have:

  • I have 3 separate blueprints. Character, level and the camera. I have dropped the camera pawn on the level so I’d guess it should be available
  • I have removed all the camera stuff from the default topdown example. From character nodes and components

What I want:

  • be able to control the camera with wasd buttons for example for moving it north/south/e/w so I can move the camera separately from the character

I’m sure you can just make a camera actor, set up its movement controls like you would a normal character (MoveForward and MoveRight), and then make a GameMode with that camera actor as the “default pawn,” but in any case, 3 Prong Gaming has an awesome tutorial for a Tropico style RTS game. I’ve started it a while back, but I never finished it. I was looking at my project just now, it’s a good tutorial.

https://www.youtube.com/watch?v=MpKXKr9alqY&index=3&list=PLDnygpcOYwFW2XtNyiandrLDG__OAZs7Q

The most simple way I can think if is to detach the camera from the character and adding local offset to move it (math needed to convert camery x&y to global x&y). Do you want to move the camera just with keys or also with edge pan?

Yea, something like this. The problem is that I can’t get any kind of control of the camera so I can’t do anything to it.

Well both… but edge pan is more important as it is the typical kind of camera for the kind of rpg I’d want to make. And it is also more difficult to make. But I’d be happy to just get any kind of control of the camera at this point :slight_smile:

Allright, to control the camera with edge pan, you will need to make a widget that covers the edges of the screen. But lets start with the simple version, using keys. Drag your camera into the event graph, drag off of it and AddLocalOffset. Then you can play around with the values a bit.

My camera is not in my character so I can’t drag it there. My camera is not in the character because I don’t want the camera to move when the character moves.

I’m starting to think this is not possible in ue4 (without writing the c++ code myself). All the default examples have either the camera attached to the character or don’t have character. I’m probably better off making my game in some other engine.

The list in your first post states that the camera IS supposed to move with the character, if it exceeds a certain distance and I’ve told you what to do with a camera that is within the character.

You may be new to UE4, but if you give up over a simple thing like this (sorry, but thats just what it is), you wont get far with any engine.

And only then. I’ve already tried doing this with the camera attached to the character and while that way I can get the camera controls to work how I want it is still attached to the character and moves with the character.

Only way I can imagine the camera being attached to the character working is that if I move the camera as the character moves just so the camera stays where it is. It sounds kinda awkward to do it that way but it is easy to do at least so I’ll test that.

It is just frustrating when I’m spending hours upon hours on this and I’m not getting anywhere at all.

Then you need to be watching this tutorial, as he covers pretty much what you want to do in the first few videos on setting up the camera system.