It may just be that fact that your character is small compared to the collision of the objects that you’re interacting with.Try giving the chair or table a basic box collision and play with the camera around it. Or it could also be, I know you said you already tested it, but the position of the camera arm. If it is toward the front of the character it might be clipping into the collision of the objects also. I’m not exactly sure, because I have little to no experience with cameras.
I am trying to set up movement for a custom character. While testing it out I have found that walking into objects makes the camera zoom in or clip through things randomly and I’m not sure why. I don’t have a lot of experience with Unreal so I’m not sure exactly where the problem is coming from. I’ve tried adjusting the camera and the camera arm but I haven’t found anything to fix the problem. Help is much appreciated!!
Video of what happens:
I’ve worked with cameras and spring arms quite a lot, and as Sparky says the issue is collision size. If you look at the detail of the chair and table actors… the collision… you’ll see that… for efficiency… it covers the whole of the object because it was designed to interact mostly with human-sized players and pawns. These don’t need the finely detailed collision that a small player pawn like a frog would…
So what is happening is that your little frog’s spring arm set to “Do Collision Test” (and your frog) is intersecting with the invisible collision geometry.
For testing purposes, turn off the chair and table actor’s collision and… in each actor’s mesh “set complex collision as simple” which will activate per pixel collision. It is very inefficient, but in a small level like this it will work just fine… and you’ll be able to test your frog.
In the long run, if you need to get close up with a small player pawn… you’d just make more detailed collision geometry for the chair and table actor… not as detailed as the visible geometry, but more detailed than the current setup.
The spring arm behavior will improve, although imho it’s collision avoidance is still fairly basic… ideally a more custom spring arm would give the player a better experience. 3rd person cameras are quite tricky to get 100% right… here is a SUPERB GDC talk about the Journey 3rd person camera 50 Game Camera Mistakes - YouTube
BTW your frog is SUPER CUTE
Is there a way to import custom geometry for collisions? I enabled complex collision as simple but there are still issues with clipping, however I managed to get it under control just by increasing the size of the frog’s collision capsule for the time being.
I agree the frog is really cute!! It’s actually not mine though, character rigging and animation isn’t my strong suit so I bought it off turbosquid here
yes, there will still be clipping… the spring arm (with “Do Collision Test” enabled) will automatically try to move closer to the pawn when it encounters collision geometry.
As you’ve noticed, the clipping will be worse if you don’t have a collision capsule that ALSO blocks the pawn from intersecting the geometry… i.e. an approximately frog-sized collision capsule… the spring arm will come inside the pawn, which looks… unusual.
As you’ll understand - ideally, you’d like your collision mesh covering your object as simply as possible (fewest polys) while giving you suitably accurate collision for the size of actors (pawns and other moving things) in your game. It’s a tradeoff between collision accuracy (lots of polys) and speed (calculating lots of polys slows things down).
In your modeling app, like Max or Maya, you can make (or procedurally generate) and import custom collision geometry.
In addition, UE4 can also auto-generate collision of varying complexity. It isn’t as accurate as doing it yourself, but it can be great… especially for smaller objects not needing detailed collision.
You can check out google for how these things are done in your modeling app and in UE4… it’s fairly straightforward
For me it was the “Probe Size” of the spring arm. It’s in the “Camera Collision” category. I looked at a default project and that is set to 12. Mine was set to 50 for some reason. Changing it to 12 fixed it for me. However I’m not sure about your project as the link you shared appears to be old and not working anymore. Good luck.