Hi, I made a triangle with arraymesh but normals doesn't work with light and shadow, what is the problem?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Mehrdad

tool
extends Node

func _ready():

var mesh_data = []
mesh_data.resize(ArrayMesh.ARRAY_MAX)
var a = Vector3(0, 0, 0)
var b = Vector3(0, 1, 0)
var c = Vector3(1, 0, 0)
var p = (b - a).cross(c - a)
var n = p.normalized()
mesh_data[ArrayMesh.ARRAY_VERTEX] = PoolVector3Array(
	[
		a, b, c
	]
)
mesh_data[ArrayMesh.ARRAY_NORMAL] = PoolVector3Array(
	[
		n, n, n
	]
)
var arr_mesh = ArrayMesh.new()
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, mesh_data)
var m = MeshInstance.new()
m.mesh = arr_mesh
add_child(m)
var met = SpatialMaterial.new()
met.albedo_color = Color(0.0, 1.0, 0.0, 0.5)
m.material_override = met

Did I compute normals good?
When I change light position mesh color doesn’t change :frowning: