Transitional Camera

So I’m trying to add a transitional camera that moves between my separate cameras, to blend between each camera mode (TP, TPS, FPS). Instead of getting an instant/hard snap to the next camera setup like I had before (Which looks a bit ugly in my opinion, so I wanted to spruce it up a bit).

I tried using vinterpto in a while loop, but it crashes each time I try to switch cameras. So if anyone can help me out with this, I’d appreciate it. Here’s a picture of my setup where it’s causing issues:

I’m assuming I’m making a rookie/beginner mistake, so hopefully it’s an easy tweak/fix :slight_smile:

Your problem is that you’re using a function, which is blocking execution until it’s complete, so your loop becomes infinite (Because delta time never changes and thus, VInterpTo doesn’t progress). You need to put it in your event graph or a macro.

Actually, you shouldn’t use a loop at all, but do one processing on each Tick.

Oh, ok! Just did some research into Functions and Macros and this makes a bit more sense. Just curious though, if I put this into a macro would it work as part of a function? I say this as my camera setup right now is mostly done within a function I created, so would a macro work inside this function or would the above issue still occur? I just want to know if I need to completely reorganize/change my setup for this. Thanks again for your help :slight_smile:

As long as you’re inside a function everything you do needs to be non-latent. Game simulation does not progress while executing a function.

The blueprint ‘Set view target with blend’ node does exactly what you want. Keep it mind that you can’t specify a camera directly, but have to provide an Actor that itself has a CameraComponent to use. A bit inconvenient, but so far I couldn’t find a better way.

Ok thanks for the help man, I’ll have to redo some things, but I think I should be able to get it working now at least :slight_smile:

Hmm, I’ll have to take a look at that. Thanks.

Update:
The reason I want to use a while loop is because there are different things that need to happen after the loop completes depending on other information. If I were to circumvent the WhileLoop node and use EventTick, as suggested here, I would have to add a bunch of extra variables, branches, and safeguards to make sure everything happens in the correct order. With the way I have it now, it’s all in a function (can be in a macro, doesn’t matter, the while loop as it is now still acts as “a big fat crash button”) that only flows in one direction.

If it can somehow be made so the while loop doesn’t halt all other operations, then this wouldn’t be an issue. I’m not trying to say everything would be magically fixed, but why is it that when someone wants to use a while loop, the only suggestion is DONT DO IT?! lol.

Bump, already on the second page here already.
Really could use some help/info here if anyone can share/pitch in some ideas :slight_smile:

Thanks again in advance.

Forgot I made this thread a while back, so I put up an ue4answers post as well.

Made some slight progress, but still encountering one last issue with this. The camera does work smoothly, but only sometimes. I have no idea why it does this atm, I’m guessing I’m just making an obvious mistake that I’ve long since lost the ability to find lol. For more details on the blueprints/the ue4 answers page check it out here: What's causing this inconsistency in my Transitional Camera? - Cinematics & Media - Epic Developer Community Forums

And now for the video of what I’m talking about:

So anyone here have a clue?