-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
ClippedCamera can push through geometry, "margin" does nothing? #36049
Comments
Reproduction project would be useful. |
I've created a MRP for this issue with 3.2.3-stable (also present in master with ClippedCamera3D): Steps to reproduce: It has a collision-enabled CSG and a BoxShape'd StaticBody as examples for collision. Indeed the 'margin' property of the ClippedCamera seems to do nothing. The 'near' property of the camera doesn't help to alleviate the problem either unless a large and unfeasible value is used. |
I'm having this issue too. For me it clips through all geometry specified by the chosen layer. I've been animating the camera with I tried attaching the camera directly to the Godot version: |
This is still a problem with version 3.3 stable. The more accurate the collision testing is (e.g. Trimesh Collision), the more likely it is to "push through" the geometry. Inaccurate collision testing (e.g. Single Convex Collision) rarely pushes through, and only with certain angular geometries. An SCC cylinder does not get pushed through, but an SCC convex polygon does at certain angles. Both are pushed through with TC. |
As a workaround, using a SpringArm + Camera3D setup may work more reliably. |
I have, and the results sadly are flimsy and inelegant compared to the simplicity of just having a camera that doesn't allow clipping |
To elaborate, the Clipped Camera only "pushes through" geometry for me when it's off-center from the Kinematic Body it's a child of. So, to any future readers wondering how to fix the problem, try centering your Clipped Camera on your Kinematic body (which admittedly it does by default lol). This works for 1st and 3rd person cameras alike. As for making it work off-center from your Kinematic Body, I have no idea. If you have an off-center 1st-person camera on a Kinematic Body that can change its angle of orientation (clipped or normal camera), it will almost certainly clip with geometry. Having it centered will give you a camera view at the Kinematic Body's proverbial belly button height; It works, but it's not ideal. Please note that I'm also a total newb at Godot, and might be speaking from a place of ignorance. So take what I say with a grain of salt, but don't be afraid to try the method that worked for me! |
For me, changing "Process Mode" to Idle instead of the default Physics completely fixed this issue. I suspect this depends on whether your camera script runs in _process or _physics_process, but it seems in my case that Idle mode is the only one that works regardless of this. It's worth a try, anyway. |
ClippedCamera was removed in 4.0 |
For rationale on why ClippedCamera was removed, see #53354. See also godotengine/godot-proposals#2560. |
From what I can tell, this is still and issue, and hasnt been fixed yet, just with the normal Camera3D node. |
Normal Camera3D node has no built in protections against clipping |
Godot Version
3.2 Stable
OS/device including version:
Windows 10
Issue description:
ClippedCamera seems to be able to be "pushed" through geometry in certain instances, and will catch the "edge" of objects and show glitchy glimpses of the background behind the objects while appearing to still be clipping to that object.
It would appear that the "margin" property also seems to do nothing, as it has no visible effect on the distance the camera can clip to geometry.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: