Example #1
0
    public void TeleportPlayer(Transform where)
    {
        playerCamTarget_offset = playerCamTarget.position - player.position;

        Vector3 nearestGround;

        NearestGround.GetNearestGround(where.position, out nearestGround);

        player.position          = nearestGround;
        playerCamTarget.position = nearestGround + playerCamTarget_offset;
    }
Example #2
0
 void Update()
 {
     foundGround = NearestGround.GetNearestGround(transform.position, out nearestGround);
 }