Hello, I am trying to make a respawn system for my own 2.5D side scroller. But I also have a custom camera setup. Now when my character dies, the camera will glitch into my character’s head. How do I fix this?
Looks like you keep spawning new cameras, but GetActorOfClass returns the first actor found in the world, so you’re updating the first camera (which has a dead target) and not the followed one.
Instead of spawning new cameras, you could reuse the existing one. When spawning BP Camera, store it into a variable. Before spawning it, check if the variable is valid. If it is already valid, don’t spawn it and simply update its Follow Target variable.
Also in event Destroyed (and wherever you use it), use the variable instead of GetActorOfClass.
So in my beginplay of thirdperson character. After SpawnActor BP_Camera I promote it to a variable? Also how do I simply update its follow target variable?
Hey I cant find where I should promote to variable. Could you be more clear where to do this please ? and also how to update the follow target Variable?