I created an UpdateRotation() function, I think that calling this function everytime we update the _xRotation and _yRotation makes the transition a bit smoother (there was a comment from Tizio about this)
I relied on 2 events to store and set the coordinates after a respawn (SetLastCheckpointRotationand StoreLastCheckpointRotation). I do not stop the listening of these events, as it is not harmful if they are triggered twice in a row.
I did a minor modification to spawnplatform, now it has a checkpoint. In this way, we save the rotation coordinates also when we exit from the spawn platform
UpdateRotation()
function, I think that calling this function everytime we update the _xRotation and _yRotation makes the transition a bit smoother (there was a comment from Tizio about this)SetLastCheckpointRotation
andStoreLastCheckpointRotation
). I do not stop the listening of these events, as it is not harmful if they are triggered twice in a row.