Skip to content

Commit ec84dc7

Browse files
author
mattrick
committed
Partially Fixed Block Bug
1 parent 47bb68b commit ec84dc7

6 files changed

Lines changed: 5 additions & 1 deletion

File tree

Assets/Scripts/PlayerIO.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ void Start () {
1717

1818
// Update is called once per frame
1919
void Update () {
20+
if (GameObject.FindWithTag ("FPSController").transform.position.y < -20) {
21+
Debug.Log("Test");
22+
GameObject.FindWithTag("FPSController").transform.position = new Vector3(GameObject.FindWithTag("FPSController").transform.position.x, 60, GameObject.FindWithTag("FPSController").transform.position.z);
23+
}
2024
if (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1) || Input.GetMouseButtonDown(2)){
2125
Ray ray = camera.ViewportPointToRay(new Vector3(0.5f,0.5f,0.5f));
2226
RaycastHit hit;
@@ -39,7 +43,7 @@ void Update () {
3943
Vector3 p = hit.point;
4044
if (selectedInventory != 0){
4145
p += hit.normal / 4;
42-
if (p != new Vector3 (GameObject.FindWithTag("MinecraftPlayer").transform.position.x,GameObject.FindWithTag("MinecraftPlayer").transform.position.y,GameObject.FindWithTag("MinecraftPlayer").transform.position.z))
46+
4347
chunk.SetBrick(selectedInventory,p);
4448
}
4549

Library/CurrentMaximizeLayout.dwlt

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
18 Bytes
Binary file not shown.

Library/assetDatabase3

0 Bytes
Binary file not shown.
92 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)