using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PositionControl_When_View_Is_Flipped : MonoBehaviour
{
    /*************************************************************************
*
* ARConnex CONFIDENTIAL
* __________________
*
*  [2017] - [2021] ARConnex Incorporated
*  All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains
* the property of ARConnex Incorporated and its suppliers,
* if any.  The intellectual and technical concepts contained
* herein are proprietary to ARConnex Incorporated
* and its suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from ARConnex Incorporated.
*/

    //For Cloud Scan Image Targets

    // The reality browser allows audiences to FLIP the AR experience 90 degrees when viewing.
    // This is most commonly used by them with scanned image targets.
    // It allows a target image to be viewed horizontal as in a magazine or vertically if wall mounted.
    //
    // The reality browser assumes 3D AR is built with Y=up orientation which fits the default non flipped mode.
    // When uploading you can set this default "Starting Orientation" if you know how your audience will be viewing the image.
    //
    // Example- If you know the target image will be a wall mounted poster you can preset the "Starting Orientation" to be flipped.

    // Ground plane allways starts an experience Y = up but user can still flip the experience if they choose.
    // If you want to omit this capability for your audience you can use the "Hide Standard UI Elements" component to hide the flip, spin, or mute buttons.

    // By default 3D content is flipped using a pivot point that is .5 units/meters above the target image.
    // This works fine for 3D experiences that are 1 units/meter high.
    // For shorter or taller 3d experiences this component will allow adjustment of the pivot point so that the 3D content can be positioned proprly when when its flipped.


    // How to use
    // Place this component on any game object in your assetbundle and input the height of your 3D content.
    // The reality browser will set the Y-up pivot point based on this value.

    // Optionally - Depth positioning will use this value with the intent that your content's center point will be on the target plane.
    // If, needed you may adjust the depth independently by inputting the depth of your 3D content.
    // Higher values move the content outward from the target plane, while lower values push the content into the target plane.

    [Header("Input the overall height of your 3D content")]
    public float contentHeight;

    [Header("If ON - Depth can be controlled when flipped")]
    public bool depthOverride;

    [Header("Input the depth of your 3D content")]
    public float contentDepth;



    void Awake()
    {
        contentHeight = -contentHeight / 2;
        contentDepth = -contentDepth / 2;

    }

}
