Model isn't visible through perspective camera [SOLVED]

I have a collection file that looks like this, the rectangle’s normals are facing inwards, that selected object is the camera looking towards the other objects:


Here are my camera properties:
image
When I run the game it looks like this:

I haven’t modified the render script at all.

I’ve attempted this with RenderCam too, which works but shows the model above the sprites, and also has a bit of distortion on iOS:


What’s going on here, and how would I fix it?

Try drawing the play area on its own render predicate material tag if you want the camera to be outside of it? I’m not sure of the exact problem if you can upload a simple sample that reproduces it would be helpful.

The default render script doesn’t draw models. You need to add that to your render script. Like this:

Create the predicate matching the tag on the model material:

Render anything matching the predicate in a separate pass:

2 Likes

The model appears now, thanks! I draw models before everything else, but the camera won’t change from this position in my game, so I won’t run into any issues.


Unfortunately I have no idea what the dark patches are on iOS. It doesn’t happen locally on my Mac. The model is just a giant cube scaled on the Z axis and the front and back faces cut off.

I know this is technically solved, but I made a small project to reproduce these weird dark patches if anyone wants to have a look.

reproduce.zip (223.4 KB)

Are your sure there isn’t another object in the scene that could account for the word black rectangle?

The only things in my collection are the player sprite, enemy sprite, green box model, and the camera. It also only appears on my debug iOS app, I can’t reproduce it on a local engine.

That said, they render the model differently with the same render script. Could be something to do with that? Here are the two side by side, using the .zip I posted above:


1 Like