The camera is like in project zomboid. How to implement?

Hello. I’m making a game similar to Project Zomboid with a top view. I want to make it so that when a character enters some buildings, the roof and walls that prevent him from seeing what is inside disappear. I don’t really understand how this can be implemented.

One method would be to repeatedly fire raycasts from the camera to the player and for any parts that are actively between the camera and the player, you make them transparent. When parts are no longer in the way, you make them opaque again.

Do not quite understand. Are you talking about light?

Raycasting lets you fire a ray from a point along a line and detect any objects that are in the path.

that video you linked is using Invisicam
image

it can be found on the settings that show when you click StarterPlayer

2 Likes

Wow. I didn’t know about this parameter, but due to the fact that in my game the camera is located above the player, for some reason it does not work

Thank you. Still, I can use it. All you had to do was change the camera type to custom

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.