Camera view goes in and out of world objects

I’m having a problem that whenever I click the play button, the camera goes through the world objects / meshes when it collides with them. Please help me!

1 Like

hi @DeadFalconking

It isnt actually going through them if you look clearer, its being blocked. but it does go inside your mesh which (as most meshes are) single sided materials , you cant see that you are infact, inside your own character as it isnt colliding with your skeletal mesh only the world

2 Likes

Hey there @DeadFalconking! Welcome back to the community! So what you’re seeing is the camera (but more accurately the spring arm the camera is attached to) colliding with objects and moving so that it doesn’t place your camera inside of objects just as High mentioned. For most games this is desirable so you cannot see into walls and (sometimes) it’s less disorienting. If you’d like to disable this feature, you can go into your character’s Blueprint, go to the spring arm (might be called camera boom in the character BP) and disable Do Collision test and your camera won’t move from it’s intended location, but you’ll also be putting it inside of walls. However for many third person games, you may find it was better before, since they usually contain larger more open spaces where the clipping rarely occurs. Give it a try and let me know if you have any questions!

image

3 Likes

Oh ic! Any solution for this?

Tysm this really helped a lot! But it still kinda goes through the meshes, like you just see in this video. How to completely remove this? It feels like some sort of hack lol.

With the built in systems this is the results you will get unfortunately. So how to fix it? You will have to make your own blueprint or c++ code and possibly use some sort of collision capsule radius on the camera itself. And set up some rules, but this can make also for confusing player controls if the movment of the character relies on the direction and rotation of the camera. You could fix one thing and break or make something annoying on another. Search google for slme camera control tutorials be a good place to start.

I would look and paste some but its best you look and choose as you want something specific

1 Like

With collision off you will always clip completely through objects, which is why I recommend to keep that on so no one can see through your meshes. There’s no out of the box way to completely block camera collision without that zoom in it does to avoid collisions. You would have to write your own variant of the spring arm or even a whole system to block the player camera movement instead of just zooming in to avoid collision.

1 Like

So any solution for this? Kinda feels like a hack in the game that’s why.

Since the default implementation (zoom in when colliding to avoid the collision) is close to the industry standard, depending on how you’d like to handle it I may be able to come up with some resources to try a different model. If you have a specific game’s style you’d like to replicate, could you grab a clip that shows it off?

Would you prefer to let the camera clip through objects, but have a clear view cut through to the player wherever?

image

1 Like

I didn’t quite get you. Sorry I’m new to this that’s the reason and I dont want the camera clipping through objects at all.

I understand, I’ll tone down on the technical gamedev speech.

What I was saying is that in most third person games like yours, the camera reacts one of three ways. It either clips entirely into objects, it zooms in to avoid it (like the default here), or it clips through but hides the object it’s clipping into just like that video I showed off.

If you have a specific game’s camera you are trying to match, I may be able to help you make it work like that instead, though it will be far more complex than using the out of the box method.

1 Like

I dont have any specific game camera neither do I want one, just the normal camera boom, and camera object under the third person blueprint.

I only asked to understand how you would prefer the camera to react to collisions.

1 Like

Oh my bad, I dont want it to clip in as I said.

@SupportiveEntity Sorry for pinging but please help?

There aren’t any resources for handling an attached camera without clipping aside from the spring arm default that introduces zoom instead. Otherwise you would need to have some form of custom de-penetration, but this is a more advanced topic. My recommendation would be to keep the default (which won’t clip into anything) and raise the camera’s base height so it’s less prone to collisions.

You can also remove the collisions from your enemies and only make the camera collide with walls and such. All you’d have to do is set camera boom/spring arm’s collisions back on (as it was before) then make sure your other pawns have the camera trace channel set to ignore. This will still have the zooming in if you put it too close to walls, but not on enemies. The alternative would be writing you an entire advanced camera system, which if you’d like to learn advanced blueprint applications I can definitely get you resources, but it will be far more complex than the terms I used here.

1 Like

Ok thanks for that. I just want to know why this video content won’t work on my project - How To Stop Camera Clipping Through Walls /Objects - Unreal Engine 4 Tutorial - YouTube (Its similar to my blueprint too)

That is actually the default functionality. In your first video it was not clipping into the walls at all, it was zooming in to avoid them the exact same way as that video. It clipped into your player because you were too close to the wall, if he walked even closer to the wall he would have shown that his does the exact same thing.

1 Like

Mhm ic… Thank you.

Hey! any way to fill up the empty meshes in my game?