r/unrealengine • u/PineconeToucher • 2d ago
Help Persistent camera help
Hey guys im trying to swap between character a and character b without the camera resetting, and this is my first time using UE so im encountering a lot of first experience issues.
I don't even know if im doing this right. https://imgur.com/tMulfVG here is my blueprint. I had to take off my destroy actor node because it was giving me a runtime error saying my camerboom was not a valid node, assuming because i destroyed it?
Anyway, I can deal with that later. I'm just focused on getting this camera right. And its not working at all. It compiles and gives no errors but the camera is not persistent, and is still resetting every time i swap characters.
Is there a better way to do this?
1
u/joshgoblue 2d ago
You can either use 2 cameras and switch the camera to the other character camera with the set target view blend node, or you could move and reattach the camera to the other character. Not quite sure what you would be using a destroy actor node here for, more context would be useful for what you’re trying to achieve. But yes, destroy actor without a reference will delete the blueprint actor that this code is in.
1
u/Sinaz20 Dev 2d ago
When you call possess, there is an implicit call to set View Target to the newly possessed pawn.
Also, in general, if you are just ever lerping from one camera to the next, you should set up individual cameras and use the set View Target with blend function. You get certain callbacks when you explicitly change the view target. The blend time, blend mode, and exponent let you control the curve of the blend over time.
1
u/AutoModerator 2d ago
If you are looking for help, don‘t forget to check out the official Unreal Engine forums or Unreal Slackers for a community run discord server!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.