3
$\begingroup$

Is there any simple way to have a camera act as a slow parent to an object yet still not go through meshes?

In many 3rd person 3D games, the camera will sometimes zoom into the player to avoid clipping through meshes.

$\endgroup$
  • $\begingroup$ I'm pretty experienced with the game-engine but I never needed anything like this. I never thought of it, but I don't know either. I could do some cool new games with the solution maybe. $\endgroup$ – Hendriks3D Apr 3 '16 at 16:45
  • $\begingroup$ Do you have any ideas of a work-around? $\endgroup$ – user23353 Apr 3 '16 at 16:48
3
$\begingroup$

Is there any simple way to have a camera act as a slow parent to an object yet still not go through meshes?

But the answer is ... there is no build-in solution. This is because any solution would be a specific solution to your game. So you need to develop your own feature.

Btw. slow parent does not matter in that situation.

Examples:

  • Perform a ray test from target to the camera. Set the camera on any hitpoint discovered. This way the camera will be behind blocking objects.
  • Perform collision test at the sides of the camera's view. Let the camera orbit around the target to avoid blocked views (see FreeView).
| improve this answer | |
$\endgroup$
  • $\begingroup$ Hey, that sounds like what I need! I hope it still works with the latest version of blender. Thanks a lot for the clever choice(I'll try free view) $\endgroup$ – user23353 Apr 4 '16 at 19:38
0
$\begingroup$

Quite interesting problem, love it. As mentioned, solutions and their implementation will vary according to the game.

Given the context you provided, maybe you could set a radar sensor in the camera to sense a game object which is within the camera vision and set an actuator to zoom the camera when this condition is met. This way, whenever an object is found between your character and the camera, your camera may zoom past the object.

| improve this answer | |
$\endgroup$

Your Answer

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