## 5 Discussion and Future Work  
After conducting a review of the technologies involved in the area of Affective Computing in Section 3, we concluded that there are mature technologies that can help to improve the sense of agency in immersive virtual environments. However, we detected that there are still several challenges that need to be addressed in the following ways:  
* Develop new techniques for adjusting emotion recognition. In the literature, recognition can be achieved by analysing expressive behaviour and measuring physiological changes. The first one has significantly improved in recent years with the advancement of Artificial Intelligence; however, recognizing emotions by analyzing expressive behavior from the data sources required by AI may involve gender and cultural biases. When recognising emotions by means of physiological signals, the preferred models are the dimensional ones. In the literature, we found that most researchers use the two-dimensional model, since there are sensors that can help to predict the level of valence and arousal reached by the user. However, in order to work with agency and the sense of agency, it is important to acknowledge the third dimension, the dominance, although objective measurement of dominance has not been achieved yet. [PERSON] and [PERSON] [56] established that the origin of emotions comes, on the one hand, from our interpretation of the peripheral physiological responses of the organism, and on the other hand from the cognitive evaluation of the situation that originates those physiological responses. Following this theory, in this work, we propose as a future challenge to develop a system capable of recognising emotions in real time through the combination of physiological metrics and emotional cognitive models. These cognitive models allow modelling users' objectives, standards and attitudes, as well as launching one emotion or another based on the agency of an event. We believe that  
Figure 8: Proposed framework for the implementation of immersive virtual environments that integrate the management of the emotion flow to improve the sense of agency. the system could use, on the one hand, physiological measurements for situating a user's emotional state in the correct global space of dimensional models. Then, with cognitive models such as Roseman [53] or OCC [28] which allow us prediction of the emotion in context (influenced by objectives, norms and attitudes), the system could refine emotional recognition. Using those techniques, the system will simulate the [PERSON] and [PERSON] [56] process which established that the origin of emotions comes, primarily, from physiological responses of the organism, and then from the cognitive evaluation of the situation. * Improve the external agency of the two-layer model [14] by adapting audio, visual and tactile content to users' emotions recognised through the combination of physiological metrics and cognitive theories. Adaptation of IVE content has been implemented at the visual level by means of interactive storytelling techniques that employ user events as inputs. However, they rarely introduce physiological metrics as input to the system or use touch as part of system response, which is essential when working with the SoA. * Improve the body agency of the two-layer model [14] by integrating the physiological metrics on the avatar body animation. The development of techniques that allow adapting the avatar animation based on the user's physiological metrics is less widespread than the expression of emotions through facial and body animation techniques. As physiological signals may involve external body changes, such as chest movement (from respiratory rate) or skin colour (from temperature), in this work, achieving a high body agency is considered essential. * Establish objective metrics for the assessment of the SoA in IVEs. In the literature review, several subjective questionnaires have been found for the assessment of the SoA.