예제 #1
0
        protected void CreateEffect(Castable castable, RaycastHit raycastHit)
        {
            Vector3    position = raycastHit.point + (raycastHit.normal * Physics.defaultContactOffset);
            Quaternion rotation = Quaternion.LookRotation(raycastHit.normal);

            CreateEffect(castable, position, rotation);
        }
예제 #2
0
 protected void CreateEffect(Castable castable, Vector3 position, Quaternion rotation)
 {
     if (castable == null)
     {
         return;
     }
     // castable caster and instantiate effect
     castable.SetCaster(_caster);
     GameObject newCastableGameObject = Instantiate(castable.gameObject, position, rotation);
 }