Big issue with a camera changing system, really need your help.

Hello !
I have a big issue here and have spend many hours trying to solve it but I can’t find anything…

I just learned to create a simple system to change the view to another camera when the character overlaps a Trigger and everything works fine…
But when the character dies several times a big problem appears.
The camera position appears to go inside the character when I end overlap the Trigger. (This only happens when I die several times so i guess it’s linked to the respawn system ?)

here’s a video to show you:Desktop | Capturé avec GeForce - YouTube

To help your answers:

The character dies by overlapping a trigger, it destroy the character and respawn it when it overlaps (A simple blueprint and really don’t know if it’s correct…)

The Message Log:
(note that the last error which is different is when I die and the camera begins to fail !)

The changing camera system:

Really hope someone has an anwser to this…
Thanks a lot !

Does the error happen on exactly the same number of deaths each time or is it random?

The first thing I’d say from the run log is that on the last line it’s trying to get a reference to your ball but none exists. Probably because it’s trying to reference it in the space of time between it being destroyed an the new one being spawned (it can take a little bit of processing time to spawn a new actor). Also on the previous lines its trying to reference it while it is pending being destroyed, which isn’t really a good thing to be happening in your code.

Rather than destroying the ball when it dies, why don’t you just move it back to the restart position (SetWorldPosition, Teleport On)?

Thank you very much for the answer !
The error is happening pretty randomly don’t know why.

I’m going to test right now to move it back to restart position, thank you !

Ok, so the problem is resolved and I’d like to thank you for that ! But there is another problem… ^^
I’ve set a world location instead of destroying it so the result is that the ball is respawning at the location I choose but when it does, it bounces against the floor and it’s uncontrollable (because it was falling just before it teleport !)
Is there a way to make the ball not move after teleport ?

Yoohoo !!! Just found it by myself, big victory for me as a beginner :slight_smile:

Found that there is a node to set a new velocity and I placed it after the teleport node.
For those who wonder how to stop a ball of moving after teleporting it’s simple as that:

Cool, have fun… :slight_smile:

Thanks Mach :slight_smile:

My tutorial series may be worth a look at.