Hello guys,
ok I have this problem: when I tap on the 3D object, I transform its barycenter into sceenCoordinates. now, I want to show a GUI.Button which follows my 3D object if it is moved. Now, can I put the GUI.Button elsewhere rather than only in the OnGUI. If not, how can I Update the position of my button in ScreenCoordinate system as often as the frequency of the FixedUpdate?
many thanks,
GC.
I’ve used something like this to build a GUI that will animate. The method I used was to have an empty GameObject positioned in front of the camera and then update a Vector3 that is the WorldToScreenPoint of that GO’s position. Then in OnGUI() just set the position of the button to that constantly updated Vector3. Works rather nicely.
Yup! brilliant … it’s exactly what I created… a kind of animated GUI around my 3D object. I want a set of buttons (GUI) when tap on the object. may thanks for the suggestions.