Create a triangle from elemented selects

I don’t understand why when I hover over an object with the intention of creating a triangle on the surface of that object, but when I draw the object, it appears at the wrong coordinates, even though I have used **localToWorld** in my code but it doesn’t work.
Can you take a look at the code and help me solve this issue?