I added a variable named “angle” to a new animation blueprint inside an NPC then i want to change it based on dot product from the NPC’s actor forward vector and the vector that is from the NPC to to the player.
after i close the game i get this error
Blueprint Runtime Error: “Accessed None trying to read property CallFunc_GetPlayerCharacter_ReturnValue”. Blueprint: NewAnimBlueprint Function: Execute Ubergraph New Anim Blueprint Graph: EventGraph Node: Set angle"
why is it showing error? and how do i fix it?
EliasPa
(EliasPa)
July 27, 2021, 7:59am
2
This is just a suggestion, but you could try checking if the return value of GetPlayerCharacter is valid before trying to access its properties.
it helped! Thank you Elias
EliasPa
(EliasPa)
August 8, 2021, 1:14pm
4
To avoid the crash, try checking if the return value of GetPlayerCharacter is valid before trying to access its properties.
EliasPa
(EliasPa)
August 8, 2021, 1:15pm
5
That’s good to hear! I’ve also posted it as an answer so that it’s clear that this question has been solved.