Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private var posX : float[];
- private var posY : float[];
- private var pos : Vector3[];
- private var i = 0;
- private var runs = false;
- function OnMouseDown () {
- startPoint = Input.mousePosition;
- runs = true;
- }
- function OnMouseDrag(){
- while(runs){
- posX[i] = Input.GetAxis("Horizontal");
- posY[i] = Input.GetAxis("Vertical");
- pos[i] = Input.mousePosition;
- Debug.Log(pos[i].x);
- if(posY[i-1] > posY[i] && posX[i-1] != posX[i]){
- corner1 = pos;
- Debug.Log(corner1 + " eins");
- }
- if(posX[i-1] > posX[i] && posY[i-1] == posY[i]){
- corner2 = pos;
- Debug.Log(corner2 + " zwei");
- }
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement