Bug Fixing
This commit is contained in:
1 parent
2baee3c197
commit
798a6dca3a
5 files changed
+15
-8
No files matched your search
@@ -130,7 +130,7 @@ public class Player : MonoBehaviour
|
||||
//send destroy block request to server
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
if (Physics.Raycast(camera.transform.position, camera.transform.forward, out RaycastHit hit))
|
||||
if (Physics.Raycast(camera.transform.position, camera.transform.forward, out RaycastHit hit, 8))
|
||||
{
|
||||
hit.point += camera.transform.forward / 10;
|
||||
client.EditBlock(hit.point, 0);
|
||||
@@ -140,7 +140,7 @@ public class Player : MonoBehaviour
|
||||
//send build block request to server
|
||||
if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
if (Physics.Raycast(camera.transform.position, camera.transform.forward, out RaycastHit hit))
|
||||
if (Physics.Raycast(camera.transform.position, camera.transform.forward, out RaycastHit hit, 8))
|
||||
{
|
||||
hit.point -= camera.transform.forward / 10;
|
||||
client.EditBlock(hit.point, 6);
|
||||
|
||||
Reference in new issue
Block a user