Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirstPersonController sees through entities because of shaders #679

Closed
valmme opened this issue May 29, 2024 · 2 comments
Closed

FirstPersonController sees through entities because of shaders #679

valmme opened this issue May 29, 2024 · 2 comments

Comments

@valmme
Copy link

valmme commented May 29, 2024

I make the game and to create a player, I use the FirstPersonController class. I also use the shader pixelation_shader. But with shaders there is a problem. I made a room in the game out of rectangular entities, but if I use any shader, the player can see through these walls when he get too close. When I remove the import of this shader, the bug is corrected
изображение

@pokepetter
Copy link
Owner

This is due to the near clip plane. Assigning a shader to the camera will set this to 1, since shaders using the depth texture will break otherwise. You can change the near clip plane this by setting camera.clip_plane_near

@valmme
Copy link
Author

valmme commented May 31, 2024

@pokepetter Thanks

@valmme valmme closed this as completed May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants