1. when cast spell, if not facing target the spell fails i wonder is there a function that will tell you if you are facing target or not

    thanks

    Absolutely not. That information is purposely not provided!