コード例 #1
0
ファイル: SavingTransform.cs プロジェクト: menezesgam/poc_vr
 public bool ChangeSavingTransform(SavingTransform other)
 {
     if (!Equals(other))
     {
         CopyTransform(other);
         return true;
     }
     return false;
 }
コード例 #2
0
ファイル: RemoteObject.cs プロジェクト: menezesgam/poc_vr
 public RemoteObject(string path, params System.Type[] components)
 {
     gameObject = new GameObject(path, components);
     this.path = path;
     lastUpdate = new SavingTransform(gameObject.transform);
 }
コード例 #3
0
ファイル: SavingTransform.cs プロジェクト: menezesgam/poc_vr
 public void CopyTransform(SavingTransform other)
 {
     Position = new Vector3(other.Position.x, other.Position.y, other.Position.z);
     Scale = new Vector3(other.Scale.x, other.Scale.y, other.Scale.z);
     Rotation = new Quaternion(other.Rotation.x, other.Rotation.y, other.Rotation.z, other.Rotation.w);
 }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        // lastMousePosition = Input.mousePosition;
        objectInitialState = new SavingTransform();
        objectInitialState.Position = new Vector3(transform.position.x, transform.position.y, transform.position.z);
        objectInitialState.Rotation = new Quaternion(transform.rotation.x, transform.rotation.y, transform.rotation.z, transform.rotation.w);
        objectInitialState.Scale = new Vector3(transform.localScale.x, transform.localScale.y, transform.localScale.z);

        objectZoom = transform.localScale;
        currentAction = InteractiveObjectAction.NO_ACTION;
    }