Camera Collision against Walls
author: Ali Abunada
The last thing you want to see in a game is a cheater; unless it's yourself of course. Working on this first sprint from scratch as a blank project meant I had to relearn the fundamentals of Unreal. It sounded simple, but of course I had my grievances with one of the most important things of gameplay--the camera. The player's camera, to be specific. After setting the camera on a spring arm, I started to walk around and noticed that the camera was clipping into one of the walls I placed into the level. This could be bad for the players playing the game as it could obstruct their view when unnecessary space they should be using to view enemies.
So the issue was obvious; I had to make sure the camera didn't clip into things. If it could clip through a simple square resized to look like a wall, it could definitely clip through other assets in our game. I thought that this was an issue with the camera, so I fiddled around with its blueprint settings for a while trying to get it to work. Assuming maybe I could use some sort of collider, I found that was quickly going to be an issue as I didn't want the camera not clipping into every object. Surprisingly, I found that the thing I was looking for was in the Spring Arm. So adjusting its target length, position, and finding something called 'Do Collision Tests' I was able to make sure that it didn't clip through anything I didn't want it to.
Get Zombats
Zombats
Third-person Ability Shooter
| Status | In development |
| Authors | Wombat Studios, JRarrat, Josh The Dark, iWannaNuhh, aabunada, Devon Flynn |
| Genre | Action |
| Tags | 3D, Third-Person Shooter, Zombies |
More posts
- Damage Feedback: Ragdoll Deaths and Screen FlashJun 27, 2025
- Shattering Expectations - Ben BissettJun 27, 2025
- Sometimes Math is HardJun 27, 2025
- The Journey to Multiplayer, Part 3 - Joshua NewtonJun 26, 2025
- Audio in C++ - Ali AbunadaJun 26, 2025
- Guns and Ballistics - Ben BissettJun 21, 2025
- Proper Ragdolling - Ali AbunadaJun 21, 2025
- Wave Based Spawning and Spawner ManagementJun 21, 2025
- The Journey to Multiplayer, Part 2 - Joshua NewtonJun 20, 2025
- Pause Menu DoublingJun 20, 2025
Leave a comment
Log in with itch.io to leave a comment.