Hello, I am making a room with windows, and there will be stuff outside the windows. Anyway, is there a way I can make it so the player’s camera cannot go through the window, and instead collides with it? Just so you can’t zoom out really far and see everything outside.
Your camera will be blocked by any surface thats less than 0.25 Transparency. If you need it to be more transparent than that you could replace the default camera script with a copy of that you’ve modified to change this behavior, but this is very annoying and you should avoid doing it if possible.
This is a solution:
- Add a part the same size as the window that’s fully visible (transparency of 0) and cancollide.
- Add a special mesh
- Set the scale of the special mesh to a super small size
You could also fork the camera code to do this.