- Home /
 
 
               Question by 
               Epicnez · Oct 11, 2020 at 11:32 PM · 
                cameragameobjecttransformpositioncamera viewport  
              
 
              Set Game Object Position to Sides of a Camera
Hello!
I am trying to set the position of a game object to the sides of a camera viewport. The idea being that the object will always stay completely on a particular side of the screen regardless of the projection size or resolution. How could this be done?
Thank you!
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Epicnez · Nov 11, 2020 at 09:46 PM
I got this working by setting the different objects positions to either 0's, and/or camera.pixelHeight, and/or camera.pixelWidth.
Full details on doing this here: https://www.reddit.com/r/Unity2D/comments/jga58s/make_object_always_stay_on_a_certain_side_of_the/
Your answer