I am using the Ultimate Character Controller, version 2.3.5, on Unity 2021.1.15f1
URP
I have setup my character locomotion to use interact ability through raycast (screenshot). I'm not using triggers.
I have a Door prefab that has an Interactable on it.
When I try to open my first door, it works.
Then any time I try to open another door, it doesn't work the first time, but it works the second time.
From my investigations, it seems the m_Interactable is not cleared after the previous door is opened. So when trying to open the next door, the casted item is not the correct door (this check is done in Interact.cs, line 135), so it doesn't open, but then it sets the m_Interactable to null. The next attempt will then set the m_Interactable to the proper, current door and everything will work.
I fixed it by setting the m_Interactable to null in
so the interactable is reset after each use.
But I don't think it's the best approach, and this use case is so basic that I can't help but think I did something wrong.
Is this a bug or should I configure something another way ?
URP
I have setup my character locomotion to use interact ability through raycast (screenshot). I'm not using triggers.
I have a Door prefab that has an Interactable on it.
When I try to open my first door, it works.
Then any time I try to open another door, it doesn't work the first time, but it works the second time.
From my investigations, it seems the m_Interactable is not cleared after the previous door is opened. So when trying to open the next door, the casted item is not the correct door (this check is done in Interact.cs, line 135), so it doesn't open, but then it sets the m_Interactable to null. The next attempt will then set the m_Interactable to the proper, current door and everything will work.
I fixed it by setting the m_Interactable to null in
Code:
Interact.AbilityStopped(bool force) (line 293)
But I don't think it's the best approach, and this use case is so basic that I can't help but think I did something wrong.
Is this a bug or should I configure something another way ?