Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class Frame : MonoBehaviour {
- public GameObject frame;
- public GameObject top;
- public GameObject topLeft;
- public GameObject topRight;
- public GameObject left;
- public GameObject right;
- public GameObject bottom;
- public GameObject bottomRight;
- public GameObject bottomLeft;
- private Vector3 vector1;
- private Vector3 vector2;
- private Vector3 vector3;
- public LeftRaycast lr;
- public BottomRaycast br;
- void Start()
- {
- }
- void Update()
- {
- vector1 = frame.transform.position - bottomLeft.transform.position;
- topRight.transform.position = vector1 + frame.transform.position;
- if (lr.isHit == true)
- {
- vector2 = frame.transform.position - bottomLeft.transform.position;
- topLeft.transform.position = -vector2 + frame.transform.position;
- left.transform.position = -vector2 + frame.transform.position;
- right.transform.position = vector2 + frame.transform.position;
- bottomRight.transform.position = vector2 + frame.transform.position;
- }
- if (br.isHit == true)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement