- Home /
Finding the limits of transform coordinates
I would like to instantiate objects with the same relative positions each time. I'm trying to find the maximum and minimum bounds of the position I can use while having the objects be completely in camera view. The camera won't be moving, so the bounds changing won't be a problem. I've found how to do it with GUI using ScreenToWorldPoint, but I can't find how to do the same with Transform.position.
Edit: tried to word it a little better
if you're trying to find a point relative to a transform you can use Transform.TransformPoint which has an example of doing what i think you're trying to do.
Close, I'm trying to find a Transform.position relative to the current camera view.
Answer by BobbyBoy222 · Sep 09, 2017 at 10:10 PM
I ended up setting up a Vector 3 using values based off of Screen.width/height, then using ScreenToWorldPoint to convert it to the final position.