How to make smooth camera rotation along spline ?

Hi. I have a camera which is moving along spline back and forth at key press and can stop at cirtain points (using timeline). So the problem is that i need to rotate it at least couple times while it move. For example to change view to different playable character.

Right now i’m using “Switch On Int” + “Find Look at Rotation” block where, depending on current spline point, my camera is focusing on next or previous character. And that’s kinda 50/50 solution because obviously i can’t get a smooth transition beetween camera view when it change focus while moving. Plus it’s just a visual mess in BP editor. Is there a better way to solve this ?

P.S. I’ve tried to use “InterpTo” function for rotation trying to make it smooth but got no result with it

I need to add some clarification. On my scheme, which was posted above, Start and End points have a route beetween them too, so the whole path is a loop. Plus there are a couple places where camera needs to go ustairs and downstairs.

  1. That’s the point.
  2. Well, at the beginning I thought that using spline it’ll be easier to make a non-linear static path for camera and manipulate with it’s settings, etc.
    But consider that the only thing that keeping me from finishing my level are troubles with spline here and there, i’m open to other methods. Even though i feel that i’ll be in need to use it somehow in the future. I’m keep learning UE :slight_smile:

Can I check a couple of things:

  1. I’m assuming your preferred method would be to position cameras exactly right ( pilot them ), and then move between those camera viewpoints smoothly.

  2. Do you specifically need a spline? So, what’s wrong with linearly moving from one camera viewpoint ( and rotation ), to the next? Do you actually want to take some circuitious route between the points?

I was fiddling with some ideas, no hard code I’m afraid. For ease of use, you might want to actually just put cameras in the world, so you can get the shots right. Then extend the spline and make a point near each camera.

Then have an editor mode custom event that sets the transform at each spline point to the nearest camera transform.

It would be most slick if the cameras were part of the spline, but then piloting them and positioning them would be a LOT of code…

Does it make sense?

EDIT: Hmmm, tried it, not great:

There’s no ‘setrotationatsplinepoint’ node, so you end up with a very linear spline… Probably same as using ‘setviewtargetwithblend’.

I had that idea. And a weird one too.

  • At first i tried to make it work using array of manually set coordinates + SetRotationAtSplinePoint. So basically when camera reaches spline point it checks coords in array and set its rotation. Obviously rotation while moving wasn’t smooth at all. To solve this i thought maybe adding MUCH more spline points will help but the amount of work… There must be a more efficient way. That’s where i’ve tried to add “R InterpTo” function. No effect though.
  • Weird one. Make an object that’ll move in front of camera so i can keep focus on it at all times. But it need own route or maybe couple more that must be add. I’m testing it but as i said it’s not just sounds weird it looks the same.

P.S. For better understanding what i’m trying to achive. I’m recreating a game from 2001 called Severance: Blade of Darkness using UE. So the Character Selection part is quite challenging and at the same time very interesting stuff for me as i’m learning UE. That’s an example of this where you can see how camera must work Let's Play Severance: Blade of Darkness - Story and Characters - YouTube.

Yes, I get what you’re trying to do :slight_smile:

If the rotation at the points next to the camera were the same as the camera, then all you have to do is lerp between points taking location and rotation into account.

I think a lot of people would do this with a level sequence, I don’t know if you use those at all…

Level sequence is designed for this kind of thing. BUT one main problem is it’s no relocatable. So if you decide you want to move the whole camera sequence to another place in the level, you have to totally redo.

If you can get the ‘twist’ right at each point in the spline, lerp will do it.

You helped me alot throughout this conversation. Thanks :wink:

Thx for givin me a direction. If you are saying that level sequence fits my goal (and maybe more flexible) i’ll try it. Though i need to test all options with spline first :slight_smile: I’m experimenting with Lerp right now.

And if i understand “Level Sequence” correctly i need to make 4 separate sequences - from character 1 to character 2, from 2 to 3, etc. and call my widget after each sequence end ? Because it seems like there no need to make just 1 big looping sequence. If so it’s really might be a way to go.

If you just want to make the camera follow a smooth path of however many parts, with or without pauses etc, then level sequence is the way…