MoveToward location causing problem if interaction start type set to Automatic

yyycct

New member
Hello,

We are trying to set up a interaction trigger automatically, and move player forward to a location first then start interaction, however it is returning this error causing weird behavior. First movetoward ability does not move at all, it teleport directly. Secondly, the interaction it suppose to trigger does not happen. Here's a screenshot of the error message, and after some debugging, it is due to m_interactable is null. Also here are the screenshots of how I set up the interaction target and interaction ability on the character.

Thanks.
Screenshot 2023-02-16 160435.pngScreenshot 2023-02-16 160451.pngScreenshot 2023-02-16 160529.png
 
Last edited:
What is line 119 of interact.cs for you? For me it's an empty line so will never cause a problem.
 
What is line 119 of interact.cs for you? For me it's an empty line so will never cause a problem.
line 119 is this function for me
public override MoveTowardsLocation[] GetMoveTowardsLocations()
{
return m_Interactable.gameObject.GetCachedComponents<MoveTowardsLocation>();
}
I used debug.log and found the m_interactable to be null
 
Can you determine why the interact ability is starting? If m_Interactable is null then CanStartAbility/ValidateObject should return false and the ability should not start.
 
Top