Attach game objects to camera as UI.

I have a list of things a player can build, and I like the idea of having the actual GameObject they're going to build be its own button.

To that end I've attached the GOs to the camera using this code:

    int c = gos.Count;
    for (int i=0; i<c; i++) {
        GameObject go = gos*;*
 <em>Vector3 slot = Camera.main.ScreenToWorldPoint(new Vector3(slots_.x, slots*.y, camera.nearClipPlane + 10));*_</em>
 <em>_*go.transform.position = slot;*_</em>
 <em>_*}*_</em>
<em>_*```*_</em>
<em>_*<p>This works exactly how I want it to, except there's some elasticity to the position of the GOs no matter when I run the above code. I've tried FixedUpdate, Update, OnPostRender, OnPreRender, etc.</p>*_</em>
<em>_*<p>One suggestion I've seen is to have these objects rendered by secondary camera, but I would like a single-camera solution so I can animate them from their slot in the UI to the ground when they're built.</p>*_</em>

Hi,

Try LateUpdate. that should do the trick.

Also, can you not attach your 3d models to the camera? they would follow automatically then.

Anyway, creating another camera is very handy when content is not linked from a world reference point of view.

Bye,

Jean