Example #1
0
        public void HandleAction()
        {
            RaycastHit hit;

            Debug.DrawRay(bodyCollider.bounds.center, transform.forward, Color.cyan, 0.1f);
            if (Physics.Raycast(bodyCollider.bounds.center, transform.forward, out hit, 0.5f, LayerMask.GetMask("World")))
            {
                var modifiable = hit.transform.GetComponent <IModifiable>();
                if (modifiable != null)
                {
                    Shaper.ReplaceBlockAtRaycast(modifiable.planet, hit, null);
                }
            }
        }