How can I control camera through blueprints

Hey UE folks,

I am currently developing a JRPG in UE4 with a battle system similar to Lost Odyssey / FFX / FFIX etc… and I am struggling to get control of the camera during the battle. I want to do camera effects very similar to what Lost Odyssey did, IE have the camera on the character when he is selecting an action, and have it switched between characters on their turn (ref here : Lost Odyssey | BOSS Fight | Grilgan - YouTube ). Also when they will attack they will have specific cameras to highlight their animation.

Right now I have a system where I could theoretically control the camera separatly for action decision / every different attack / skills I want but I’m struggling to do so as I find very little documentation on this and I’m a beginner in Blueprints. Do you guys know of any good tutorial / documentation that could address this problem? Or has anyone done it before and explain how they did / would do it ?

Thanks a lot for your help in advance !

There are lots of ways that this can be done, that’s why there aren’t any bits of documentation, because this is a very specific subject that is supported by lots of much broader systems and functions available in Blueprints.

As a result, there isn’t a specific answer. It will just require experience and exploration with Ue4 blueprinting for you to find the best option for your project.

This is quite an ambitious thing to attempt if you are very new to blueprints, and I would suggest working on smaller project to improve your skills in a specific area instead and work your way up to JRPG game, but you may be determined to go ahead with this, and so, here are a few things to look into to get the desired effect you want.

The video shows a lot of smooth interpolation between different angle as positions. using nodes like VInterpTo, RInterpTo, and TInterpTo can create nice fluid motion between points. Build a function that calculates what angles to take of each point of interest dynamically.

You might want to also look into Enumerations and the Switch Enum nodes, it will help you control the flow of your logic well and choose camera angle contextually, and in a controlled manner.

Timeline Nodes can have a lot of versatility when paired with things like LERP nodes, which could work as an alternative to InterpTo nodes.

Lastly, as a bit of extra advice, when making a system like this, try to build single functions capable of doing lots of things, as opposed to making lots of separate functions doing a very specific thing. Projects like this, that have lots of potential angles/animations/sounds etc for the camera, will get very unwieldy very quickly.
I would create a function that allows you to input various information, such as: The Focal Point, Angle Type, Speed, Tracking Options, and have the function contextually and dynamically use this information to switch to the desired angle.
When a player’s turn starts, it may call the function inside your camera actor, and provide it with it’s own location, so the camera knows to look at that player, since their turn started.

Extra actor components may also be useful, such as the Spring Arm component for the camera. It allows you to control the focal point more easily, have smooth camera movement to avoid hitches and snapping.

TL;DR, there is lots that could help you achieve a similar effect, it will be a tough task for someone new to blueprints, since it will require some clever use of blueprint functions to build an efficient but effective system for controlling the camera, and may require some exploration with the before mentioned nodes to decide on what fits your project best since I’m sure you’ll want to add some of your own features/flavour to the existing systems you are looking at.

Best of luck!

Thanks for the quick and detailed answer !

I’ll try messing around with the nodes you adviced and see what I can do with it. The function is definitely a great idea, as I was at first going for a specific solution for each action, which would have ended up being super messy as you said.

I actually already did some smaller project but this is the first one with a good realisation ambition that’s why it’s completly new to me.

Thanks again I’ll let you know how it goes !

No problem. A fantastic youtube channel to follow is: https://www.youtube.com/channel/UCOVfF7PfLbRdVEm0hONTrNQ

He does a series called “WTF is?” and does detailed breaks downs of nodes and features in Ue4. This is an excellent way to learn Ue4 BPs, since he has such informative and pure breakdowns of features. It teaches you how to make your own Blueprints well and pick up good habits.
As opposed to watching tutorials. Most Youtube tutorials are really bad and will have you picking up nasty habits that make it hard to learn at later levels. If you follow Mathew’s videos, you’ll be on your way to making your own intuitive games and features.