[TASK] Initial commit with basic product setup

This commit is contained in:
2019-08-18 13:50:14 +02:00
commit 01a66a8e1f
2548 changed files with 167528 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Mapbox.Examples
{
public class DragableDirectionWaypoint : MonoBehaviour
{
public Transform MoveTarget;
private Vector3 screenPoint;
private Vector3 offset;
private Plane _yPlane;
public void Start()
{
_yPlane = new Plane(Vector3.up, Vector3.zero);
}
void OnMouseDrag()
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
float enter = 0.0f;
if (_yPlane.Raycast(ray, out enter))
{
MoveTarget.position = ray.GetPoint(enter);
}
}
}
}