Forum rules - please read before posting.

Request: Fade Player (Camera Feature)

Are there any plans to implement some kind of fade feature to hide the player model when they get too close to the camera, using the Advanced Third Person Camera? Opsive's controller has this and it is used in many games, recently I noticed it in Shenmue 3, to prevent the camera clipping through the character mesh(es) when it's trapped between a wall and the player with nowhere to go. I do not need their controller for this particular project though, and I am using Adventure Creator's Advanced TP camera which is actually great.

Comments

  • How a character can fade will vary from situation to situation - it could rely on an Animator, the shader, Render Pipeline, etc. This is therefore best left to custom script.

    To determine the flat distance (i.e. not account for height difference) between the camera and the player:

    float threshold = 0.5f;
    Vector3 cameraFlatPosition = new Vector3 (Camera.main.transform.position.x, KickStarter.player.transform.position.y, Camera.main.transform.position.z);
    float distance = Vector3.Distance (KickStarter.player.transform.position, cameraFlatPosition);
    if (distance < threshold && KickStarter.stateHandler.IsInGameplay ())
    {
        // Hide the Player
    }
    else
    {
        // Show the Player
    }
    
  • Righto, thanks Chris.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.