Download

Adjusting Camera Collision and transitioning

Hello, I had another post as well as an answer hub question but after seeing other topics relating to collision and/or clipping, I was able to put 2 and 2 together to fix what was ailing me. Initially I had a problem with A) the camera snapping above and far in front of my character whenever I turned the camera against a wall, even when I wasn’t necessarily near a collision; and B) being able to see through the wall when I turn the camera at an angle. I managed to solve those issues but I have one more thing I’d like to ask:

When transitioning between a larger room and then into a small room, the camera, of course, will snap to a position in which it can fit in the room. Is there any way to make the camera transition smooth, instead of snap instantly? It makes it feel unnatural and some games I’ve played had the camera collision transitioning at a quick but smooth transition. I’m using the third person template and for me, the transition is snappy and annoying. And as for “A)” above, I still would like to know if there is a way to make it so the camera won’t go so far above my character when I’m up against a wall, and instead just make it go up towards the back of his head or so.

If you need custom camera collision behavior then the only way that I can think of is to disable the default collision and do everything manually with traces etc. then linear interpolate the coordinates to get smoother motion.

It’s probably easier said than done though :stuck_out_tongue:

Have you tried enabling camera lag? maybe it’s enough in your case.

Whoa!! Well I know nothing about traces and what not right now. However I just looked up camera lag and all I can really find are examples for the sidescroller template, will it apply to 3rd person? I’ll look over it and see if it does and will let you know if it works, thanks!

Edit-

Alright, well I watched this video and while it definitely does work with third person, it makes the camera feel quite weird as it’s sliding around while you’re just moving your character. I do like the effect it gives when it deals with collisions, it slides into the collision instead of snapping, just like I wanted. Bah hah, is there any way to make it only work during collisions and not during normal camera movements D:?

It really makes the camera feel like it’s a separate entity that you aren’t actually controlling.

The lag settings are in the CameraBoom (spring arm) component so yes you can find it in 3rd person too :stuck_out_tongue: don’t expect too much from it though.

Unfortunately the Camera Lag still doesn’t help. The hard snap of the camera collisions still remain, and it also keeps the aspect of me feeling like I’m not able to control the camera directly. When the blueprint is enabled, the soft camera collision transitions are present, but the annoying camera controls are there as well.

With using Camera Lag only, the lag is present, but the hard snap collisions are still there too. It’s something in the blueprint that’s giving me the effect I want with the smooth transitions, but sadly enough I don’t like how the rest of the camera feels when just running normally. When I run diagonal, the camera turns; if I run diagonal while manually turning the camera, it looks as if the camera is fighting between my manual movements and then the movements that just turning my character are applying. Something tells me that it’s not exactly useful for 3rd person.

Could you explain how Traces / linear interpolation would help achieve what I’m after?

Its using a raycast (unity term i know) but sends a invisible line out in directions you supply or all and once it hits an object it takes reference of it allowing things like camera collision to happen at the time of impact and not as of now just after they overlap is too late…
you can to be easy set camera blocking volumes (this is all in UE4) and that will give same effect but im guessing thats in the end more CPu intensive then behind the scenes checks from the camera position…