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 ?)
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…)
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)?
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
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: