[SOLVED] World Space appears off camrea

Full disclosure up front I’m building with Unity 5.5.0f3, the HDD on my computer is tiny, so I could not possibly fit both 4.6.x and 5.x on it. Up to this point I’ve been able to solve the problems myself with the help of the docs.

When I change grass’s Render Mode from Screen Space - Overlay to World Space. The grass renders off the screen, it looks as though it is not a UI element and I suspect therein lies my problem. In the console I get the following error

“Screen position out of view frustum (screen pos 816.000000, 0.000000, 1000.000000) (Camera rect 0 0 816 332)
UnityEditor.DockArea:OnGUI()”

Here is what I see when the grass is set to Screen Space - Overlay:

Here is what I get when I set it to World Space:

I’ve tried a few things to correct the issue:

  1. I moved the camera around in an attempt to frame the canvas, that lead to a mess where the image was gigantic on the camera view, I tried to adjust some camera settings but it never seemed to actually look like it was supposed to.
  2. I rebuilt everything on Level_02 and had the same issue… and again on Level_03.
  3. I deleted the camera and replaced it, reset it’s transform. Reset the transforms of the grass, camera and everything else in the scene.

I’m at a loss here, and am hoping someone can point out some silly little thing I over looked (as is usually the solution to things like this) so I can move on correctly. I’m tempted at this point to attempt to continue through this course with the canvas in Overlay, but I’m sure that’s not a good idea.

Thanks for the help!!

Judging by the width/height + scale + pos + pivot, the canvas is ok, pivot is at the center (0.5,0.5), pos X and Y are correctly set both at width * scaleX / 2 and height * scaleY / 2 respectively, so the issue must be in the camera.

Try to use these settings in the camera game object:
Position X and Y = same as the Canvas (221 and 166)
Size = 4.5 (assuming the UV Rect of the Grass game object has W = 6 and H = 3.375)

However, why are you using a Width x Height of 1200x900 instead of 1600x900? You should setup everything for a default 16:9 ratio, in order to cut the sides when switching to a 4:3.

Thanks for the help. This looks like it’s working. I also discovered that this issue was addressed in the next video… So that’s a bit embarrassing.

Also, fixed 1200x 900 setting it to 1600 X 900.

Thanks for the help.

Good, remember to change the Size parameter of the camera to 3.375 if you switch to the 1600x900 canvas resolution.

Privacy & Terms