In my game you can spawn in and switch between character. There will only ever be one or two characters on screen at any given time. Below is the character switching script.
As is, I can switch between my two to characters fine but it snaps from one to another and doesn’t have that smooth transition like you see in Lego games (as shown below).
I have tried different things but the only thing that has given me any success is the “Set View Target with Blend” node. I found two ways of implementing it that actually do something, but neither are the desired result. The first is shown below connecting a “Get Player Controller” into the “New View Target” slot. It snaps the camera view from the first character to the second (like it did originally as shown above), but then smoothly blends from there into the character as you would get if there was no camera at all (as shown below).
((Above) Starting from the character on the left after pressing “R” camera snaps to the red character on the right and then slowly blends in to a first person view (Below))
Also if there is only one character in the level and “R” is presses in the first example it will still transition smoothly to a first person camera and if pressed again it will snap back to third person and then immediately smoothly transition back into first person.
If I, however, connect a “Get Player Camera Manager” node into the “New View Target” slot, the camera will still snap to the second character but then slowly blend backwards into a wider shot. It will also cause the camera to stop following the possessed character. (The camera will follow the character during the smooth blend, but as soon as that ends the camera stops following)
Also if there is only one character in the level and “R” is presses in the second example it just zoom out smoothly and stop following the possessed character.
These two thing are the only thing I tried that have any smooth blend at all. But neither of these gives me the smooth transition like in Tt Lego game. If any of you good people now of how to fix it or of thing I could try I would greatly appreciate it. Also, if you need any additional information or have any question I respond as promptly as I can. Thanks in advance.
I am partly following: you have 1 or 2 characters, and each one has 2 camera positions (a FirstPerson view, and an isometric side view).
OnButtonR_Pressed() you want to cycle to the next camera position: Character1_Isometric->Character1_FirstPerson->
if only 1 character then Character1_Isometric
else Character2_Isometric->Character2_FirstPerson->Character1_Isometric
(I am partly presuming the next step is to implement the reverse, but get it working first kind of thing)
Is this right for your situation?
technically there is no limit to the number of cameras, but you take massive performance impact per camera that is rendering, so that becomes your limiter. (there is view target things but that just makes the hall of mirrors hard)
for the camera not following the new target after SetViewTareget() are you feeding in the Location of the Actor, or the Actor itself?
when the camera arrives are you attaching it to the Actor somehow to maintain the relative position?
are you using CameraBooms per character, or are you using fixed distances with attachment to the Character’s (probably) Root?
does the camera rotate toward the “OtherCharacter” as ViewTarget when they move away?
there is a soft answer where each character just has 2 cameras attached, and then you have a floating camera that you just move from target position to target position.
start with Camera0 (the one attached to the Character1_Isometric)
onSwitchCamera() Set Camera2 at the transform of Camera0.
blink the screen black to clear the buffer, while switching to Camera2,
move that Camera to the transform of Camera1 (the one attached to the Character1_FirstPerson)
then blink the screen black to clear buffer, and swap active camera to Camera1.
then repeat the steps for the next camera in the chain. keeping Camera2 as the go between.
this method is extensible to technically any number of characters, just only have 1 Camera active at a time, and you would probably want the CameraManager to know of all the cameras, or at the very least all the characters) so there is a registration that will need to take place.
Thanks for the response. It seams I was a bit unclear with my question. There should only be one camera on each character.
It should go from Character1_Isometric to Character2_Isometric and then back to Character1 ect. Each character has a camera attached to a spring arm. Also, if there is only one character. pressing “R” should do nothing. Each of these characters are a child of a parent that give them this camera.
The reason it goes first person has something to do with how unreal handles camera view when it cant detect a camera or when there are no cameras. If you were to open a new 3rd person template in unreal, go to the third person character and delete the camera, compile it, and then press play Unreal will put the camera view in the character making a 3rd person perspective. This is what is happening with my game.
Hope that cleared it up. I’ll go and try out the method you suggested to see if it is able to get the look I want. If you have any suggestions with the added clarity I would greatly appreciate it. Thanks again