Hello,
I have an issue trying to sit a character on a chair.
I'm working on the 2.3.1 version of Ultimate Character Controller on Unity 2020.3.2f1.
I created an interactable ability to sit on a chair object, activable pressing the F key when the character collides with a box around the chair. The character have 3 animations here: StandToSit, IDLE_Sit and SitToStand (the user make him stand up by pressing F a second time). To know in which state is the character when the F key is pressed, I created a boolean IsSitting, to start the right animation (StandToSit when we press F while IsSitting = False and SitToStand when we press F while IsSitting = True). This boolean start at false and change every time that F is pressed. My problem is that the F key is linked with other interactable abilities, that I use when my character is near other objets, and even if F is pressed for other abilities, the way I created it my boolean IsSitting will change. So sometimes, after using other abilities, when I want to sit, the F key will try to make my character stand up while is already standing.
Please, if you see any solution to this problem, I would be very gratefull.
I have an issue trying to sit a character on a chair.
I'm working on the 2.3.1 version of Ultimate Character Controller on Unity 2020.3.2f1.
I created an interactable ability to sit on a chair object, activable pressing the F key when the character collides with a box around the chair. The character have 3 animations here: StandToSit, IDLE_Sit and SitToStand (the user make him stand up by pressing F a second time). To know in which state is the character when the F key is pressed, I created a boolean IsSitting, to start the right animation (StandToSit when we press F while IsSitting = False and SitToStand when we press F while IsSitting = True). This boolean start at false and change every time that F is pressed. My problem is that the F key is linked with other interactable abilities, that I use when my character is near other objets, and even if F is pressed for other abilities, the way I created it my boolean IsSitting will change. So sometimes, after using other abilities, when I want to sit, the F key will try to make my character stand up while is already standing.
Please, if you see any solution to this problem, I would be very gratefull.