I have a side scrolling platform game. I am animating the camera from point A to B and my character has to keep up with the camera's FOV to reach the level's objective. I would like my character to die if he slows down to a point where the player falls outside the FOV of the camera.

Respawn However, during respawn the character should the camera re-aligned to his spawn position (also the "death wall" object which creates the collision, off screen must also realign to the camera).

Please could I have some advice on the correct process. I am assuming it would require some Python code, but I have no experience with programming! Thank you in advance.

  • $\begingroup$ The death wall could just be parented to the camera. Then it would always be in the same position relative to it. Will the camera zoom in and out (do close-up shots?) and also is it orthographic or perspective, because if it is ortho you can skip the collision calculations and just kill the player when his distance from the camera exceeds a set value. Or I suppose you could flip it around and kill him when his proximity to the death wall (on the horizontal axis) reaches 0. This is all theoretical, but I don't see why these approaches wouldn't work. $\endgroup$ – Mentalist Jan 27 '16 at 4:16
  • $\begingroup$ I didn't plan on having any movement on the camera other than a linear motion on a single axis. The death wall is currently parented to the camera movement and it is working fine except for the issue of the death wall and camera resetting in line with the character after losing a life and being brought back to a re-spawn. $\endgroup$ – Xav Jan 27 '16 at 14:37
  • $\begingroup$ its okay, by using scene changes transitions and collision boxes i can now move multiple objects to certain positions on the design and reset accordingly. problem solved. $\endgroup$ – Xav Jan 28 '16 at 8:53
  • $\begingroup$ Nice! Glad it's working for you. I'd be curious to look at your setup if you're willing to post a .blend, and possibly answer your own question. $\endgroup$ – Mentalist Jan 29 '16 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.