I’m trying to draw an area (or an object) through other objects, so it always appears in front.
I was hoping I could make some kind of shape that I could drag through the level, that only some objects could be seen through, but I’m not sure how to do that.
Basically in this area, it would draw everything except the occluding object(s). I was thinking of having a second camera that would draw everything except the object but I’m not sure how I would display just a small section of that camera on the viewport I already have, or how I would prevent drawing the occluding object(s) but draw everything else.
Here is a picture, it isn’t a great picture but it should get the point across:
You can use “Translucency Sort Priority” option in detail panel under Rendering category
But this option only work if object has translucent material.
Give your occluding object a translucent material, than set “Translucency Sort Priority” to a value greater than 0 or higher
The result :
Purple jelly will always in front of pink jelly!
Attach a large object (plane is best I think) with a circle transparent material and attach to your player.
The object will follow the player and occlude everything except the transparent area on the object
Hi. Thanks for the suggestion, but it didn’t really work at all. It drew the circle above everything else, but not the character or the other objects being occluded.
Ok, this seems like it would work, but having everything be translucent materials causes a lot of lag, which won’t work for the game. Do you think there’s any other way to do it?
Ok, the problem with this is that the object is always occluding the screen. the problem I have is that I have some random 3D objects in the world, and sometimes they get between the player and the camera. I want the parts of the models that are between the player and the camera to not be drawn. It’s not that I want an object with a hole in it, it’s that I want basically a cylinder from the camera to the player to prevent objects being rendered inside that area.