Drawing and rotating an object in the corner of a camera's view?
I'm trying to draw an object so that it will always appear in the top right corner of a camera's view, no matter what direction the camera is actually pointing. While the object shouldn't move from this position, I want it to be able to rotate to match the current orientation of the camera.
This is actually the same feature that Unity already has in its scene editor: I just want to know how to implement it into an actual game.
Any suggestions on how I could accomplish this?
The simplest way to do this might be using a canvas and adjusting a UI element's Rect Transform to stay at the top right corner of the camera's view.
Adding on to what Trey said, as long as you have a reference to that Canvas's GameObject, you could set some hide flags on ithe so it wI'll be hidden from the hierarchy.
Answer by MrKagouris · Nov 10, 2016 at 02:19 PM
You can add the object as a child to the camera at the correct position, then use this.