Пример #1
0
        public static Ray AimAtHead(HTNPlayer npc, ref NpcPlayerInfo info)
        {
            Vector3 vector3 = npc.eyes.position;
            Vector3 player  = info.Player.eyes.position - npc.CenterPoint();

            return(new Ray(vector3, player.normalized));
        }
Пример #2
0
        public static Ray AimAtBody(HTNPlayer npc, ref NpcPlayerInfo info)
        {
            Vector3 vector3  = npc.eyes.position;
            Vector3 vector31 = info.Player.CenterPoint() - npc.CenterPoint();

            return(new Ray(vector3, vector31.normalized));
        }
Пример #3
0
        public static Ray AimAtHead(HTNPlayer npc, ref NpcPlayerInfo info)
        {
            Vector3 position   = npc.eyes.position;
            Vector3 vector3    = Vector3.op_Subtraction(info.Player.eyes.position, npc.CenterPoint());
            Vector3 normalized = ((Vector3) ref vector3).get_normalized();

            return(new Ray(position, normalized));
        }