I use a Free Look Virtual Camera to look at and follow a ragdoll when the player dies. This is pretty simple, just setting the Follow and Look At properties. I also have a Cinemachine Collider on the virtual camera, so that the camera doesn’t go through walls. You can see the ragdoll camera follow about 10 seconds into this video:
The problem I have is it seems that the camera will always spawn a little forward and left of the player transform. I’d like to have some control over the spawning behavior, so that I can ensure that the thing that killed the player will be in the frame. Notice in that video clip that the camera’s position causes is to face away from the explosion that killed the player, which isn’t ideal.
I don’t think I can just manually set the position of the camera, because I need it to take collision into account. (If I manually chose a position, it might spawn on the other side of a collider.). But is there some way to have some degree of control over the initial position, so that it spawns with both the LookAt target, and one other thing, roughly forward of the camera?