In my 3d game, i would like to display a text 'near' the impact point of a bullet. I think i'm having problems setting properly text position. This is my code. The script is attached to an object Canvas. position is the Vector3 impact position.
GameObject obj = new GameObject (); Text _text = obj.AddComponent<Text> (); _text.transform.position = position; _text.text = message; _text.fontSize = startSize; _text.color = color;
I'm pretty sure i've to convert from a world space to a 'user interface' space. Thanks