How to Make a Mirror in Godot 4 (Camera Viewport Method)
Автор: DrewienkoIndieDev
Загружено: 2026-02-06
Просмотров: 27
Описание:
In this video, we create a real-time mirror in Godot 4.6 using the SubViewport camera method.
We use a second camera to fake a reflection that works even when the mirror is rotated or moved.
This is an updated version of a technique from an old tutorial, updated for Godot 4 — with help from comments left by dirtspade and steveman9668 under that original 7-year-old tutorial. Huge thanks to them for figuring out how to make this work in the current Godot.
▶ Original 7 years old tutorial:
• How to make a mirror in Godot
👇 Github repo with with all the files:
https://github.com/DrewienkoIndieDev/...
🎵 Music:
"Sketchbook 2024-03-20_02" by Abstraction
https://tallbeard.itch.io/music-loop-...
(CC0 / Public Domain)
⏱ Chapters
00:00 – Intro & how the mirror works
00:37 – Scene setup (Mirror, SubViewport, cameras)
01:50 – Mirror material + shader
03:29 – Mirror camera script logic
06:26 – Player camera hookup
07:22 – Testing the mirror
08:39 – Adding a mirror frame
09:57 – Fixing blocked reflections (layers & cull mask)
13:18 – Final tip & outro
If this video helped you in any way, consider leaving a like or subscribing!
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: