Hi @Justin
I'm using an interact ability that is using Raycast for detection.
I want to use OnObjectDetected whenever the ability detects an object (for a custom object highlighting) but the problem is,
"DetectedObject" is set when raycast hits an object + if the Ability' "Ability Message Text" is not empty.
Can't say for certain if this is a bug but controller functionality works differently (setting DetectedObject) based on "Ability Message Text"
I've taken a look at the code and noticed this line
m_CheckForAbilityMessage = !string.IsNullOrEmpty(m_AbilityMessageText) || m_AbilityMessageIcon != null;
in Ability.cs
If I set the m_CheckForAbilityMessage to true by force, DetectedObject is set when raycast hits and thus OnObjectDetected event is fired.
I would make a copy of Interact ability and set m_CheckForAbilityMessage to true but Initialize method is not virtual and I don't want to change base class code.
What do you think is happening? How should I make this work for me?
I'm using an interact ability that is using Raycast for detection.
I want to use OnObjectDetected whenever the ability detects an object (for a custom object highlighting) but the problem is,
"DetectedObject" is set when raycast hits an object + if the Ability' "Ability Message Text" is not empty.
Can't say for certain if this is a bug but controller functionality works differently (setting DetectedObject) based on "Ability Message Text"
I've taken a look at the code and noticed this line
m_CheckForAbilityMessage = !string.IsNullOrEmpty(m_AbilityMessageText) || m_AbilityMessageIcon != null;
in Ability.cs
If I set the m_CheckForAbilityMessage to true by force, DetectedObject is set when raycast hits and thus OnObjectDetected event is fired.
I would make a copy of Interact ability and set m_CheckForAbilityMessage to true but Initialize method is not virtual and I don't want to change base class code.
What do you think is happening? How should I make this work for me?