Hi! I need some help with setting up the blueprint tree. I want to toggle between three avaiable cameras ( which I have already created ) with every push of “C” button. I have been struggling with these for some longer time and cannot get it to work properly…
Should work this way:
Game starts with the default third person follow camera active ( named “3rdPersonCamera” in my case )
Then I tap “C” to change default ( “3rdPersonCamera” ) camera to “3rdPersonActionCamera”
Then the “3rdPersonActionCamera” is active and “3rdPersonCamera” is deactivated
Then when I tap “C” key again, the “3rdPersonActionCamera” is deactivated and “1stPersonCamera” is activated
When the “1stPersonCamera” is active I tap “C” key once more
Then the “1stPersonCamera” gets deactivated and view goes back to default “3rdPersonCamera”
I would actualy do the same thing with just one camera. You can just tweak your offset parameter. And then you can use a timeline inside of blueprints to smoothly interpolate between three pre-defined points.
You can copy paste in your project from blueprintue.com or from here directly
(Looks like y can't post the full copy of the blueprint because its to big, if you want to copy paste you have to get it from blueprintue, sorry)
Before to paste it you are going to need to create one variable named “SwitchCamera” with type of Integer and change my camera variables with your camera variables.
If you need more help here i am.
I already thought that option but you can only use it with an actor reference and not with another camera in the same actor. Im correct with that?
What i understand Wielkiczarnyafgan is trying to do is switch between cameras in the same actor.
Offtopic… your books are awsome!
I don’t have the engine in front of me, but can’t you just set “Target” to either Get Player Controller / Get Camera Manager on all three and the “New Target” to each camera? :>
I can’t place “SetViewTargetWithBlend” in “MyCharacter” if i leave on Context Sensitive. So i placed that node in MyPlayerController but if you try to get the camera and place it where says NewViewTarget says “Camera Component Reference is not compatible with Actor Reference”
In your Character BP, you want to create the “Get Player Controller” FIRST, then from the output of “Get Player Controller”, click and drag to the right. When the CBL opens up, select “Set View Target with Blend” and after that pick the cameras as per usual.
The reason the casting doesn’t let you set the camera is because it’s sending an “Actor reference” and it can’t see it’s a camera
Hum… i only can see half of that magic
I can have now “Set View Target With Blend” node without deactivating Context Sensitive Yay Magic works fine here
but my camera still don’t want to connect to SetViewTarget land ;(
Still saying its not compatible with it. Maybe im having something wrong with my camera and they don’t want to connect?
Ah it might be a problem with using the node in MyCharacter, As I said I don’t have the engine in front of me and sometimes you get quirks like this
There’s plenty of ways around it (Of course, Thanks to wonders of Blueprints) but when I get in front of the engine, I’ll figure out a simple way for you. One possible way would be to have the cameras separate from the player but attach them to it, and then simply cast them in.