Beispiel #1
0
        public override void OnLMBDown(ModelEngine engine)
        {
            RaycastHit hit;

            if (engine.Raycast(out hit))
            {
                PlaceSubdividedObj(hit.point, hit.normal, engine.material);
            }
        }
Beispiel #2
0
 public override void OnLMBDown(ModelEngine engine)
 {
     if (phase_ == E4Phases.PlaceFirstSpot)
     {
         RaycastHit hit;
         if (engine.Raycast(out hit))
         {
             phase_   = E4Phases.DrawBase;
             base_[0] = base_[1] = hit.point;
             plane_   = new Plane(hit.point, hit.point + new Vector3(0, 0, 1), hit.point + new Vector3(1, 0, 0));
         }
     }
     else if (phase_ == E4Phases.RaiseHeight)
     {
         phase_ = E4Phases.PlaceFirstSpot;
     }
 }