the solution for :
animated_sprite_2d.material.set_shader_parameter("player_pos", pos)
is not working, it didn’t set any value, the log result as below :
Enemy : (-2051.0, 2146.0)
Player : (3.0, -78.0)
direction : (2054.0, -2224.0)
Direction Length:3027.39038085938
player postion in world : (3.0, -78.0)
function called …
positions of player : (3.0, -78.0)
value of shader :
value of tree_pos : (0.0, -52.0)
player postion in world : (3.0, -78.0)
function called …
positions of player : (3.0, -78.0)
value of shader :
value of tree_pos : (0.0, -52.0)
player postion in world : (3.0, -78.0)
function called …
positions of player : (3.0, -78.0)
value of shader :
value of tree_pos : (0.0, -52.0)
player postion in world : (3.0, -78.0)
function called …
positions of player : (3.0, -78.0)
value of shader :
value of tree_pos : (0.0, -52.0)
player postion in world : (3.0, -78.0)
function called …
positions of player : (3.0, -78.0)
value of shader :
value of tree_pos : (0.0, -52.0)
player postion in world : (3.0, -78.0)
function called …
positions of player : (3.0, -78.0)
value of shader :
value of tree_pos : (0.0, -52.0)
player postion in world : (3.0, -78.0)
function called …
positions of player : (3.0, -78.0)
value of shader :
value of tree_pos : (0.0, -52.0)
player postion in world : (3.0, -78.0)
function called …
positions of player : (3.0, -78.0)
value of shader :
value of tree_pos : (0.0, -52.0)
player postion in world : (3.0, -78.0)
function called …
positions of player : (3.0, -78.0)
value of shader :