Uploaded November 2023 | Updated September 2026, 3 weeks ago
In this tutorial I will explain how to prevent player peeking through walls adding push-back mechanism to instead move the player away from the wall.
Learn more from about Unity Game Dev in my video courses at:
courses.sunnyvalleystudio.com
Scripts on Github:
github.com/SunnyValleyStudio/Unity-VR-Prevent-Head-Clipping-with-Player-Push-Back-and-Fade-effect
Join the discord:
discord.gg/RQEtYHz
You can support me through Patreon:
patreon.com/sunnyvalleystudio
00:00 Introduction
00:29 Detection Head collision
04:38 Testing Wall Collision Detection
05:38 Adding Push-back effect
08:42 Pushing Camera away from the wall
In this tutorial I will explain how to prevent player peeking through walls adding push-back mechanism to instead move the player away from the wall.
Learn more from about Unity Game Dev in my video courses at:
courses.sunnyvalleystudio.com
Scripts on Github:
github.com/SunnyValleyStudio/Unity-VR-Prevent-Head-Clipping-with-Player-Push-Back-and-Fade-effect
Join the discord:
discord.gg/RQEtYHz
You can support me through Patreon:
patreon.com/sunnyvalleystudio
00:00 Introduction
00:29 Detection Head collision
04:38 Testing Wall Collision Detection
05:38 Adding Push-back effect
08:42 Pushing Camera away from the wall










