Touch Camera Controls with C# and Godot [Andromedoom Dev Log 3]
HTML-код
- Опубликовано: 5 июл 2024
- 👾Welcome to the Andromedoom dev logs!
In episode 3, I'm showing you how I set up camera controls using the touch screen. In the dev log, I will be presenting the city building models I pulled together for Sydney and Singapore.
I hope you enjoy this video series and stick around for the game's development! 👋
⏱️ Timestamps:
0:00 Intro
1:10 Setting up a touch region with TouchScreenButton
2:30 Scripting - Dynamically resizing the touch region
4:15 Scripting - Setting the position of the touch region
5:12 Testing the touch region
6:15 Scripting - Receiving touch events
8:30 Connecting the touch region to the camera using a singleton pattern
11:16 Setting the singleton object in Godot
11:34 Connecting the touch region to the camera with a property
13:51 Setting up drag inertia
15:20 A word from our sponsor polysthetic.threadless.com
15:50 Dev log - How I built the pixel art models
17:34 Dev log - Sydney buildings
19:23 Dev log - Singapore buildings
21:18 Criteria for choosing buildings
23:42 Conclusion
📻 Addenda:
1. Be sure to watch episode 2 if you'd like to see how the camera gimbals are controlled ( • Camera and Keyboard Co... ).
2. Alternative methods for connecting to the camera include using signals, or using GetCamera().GetParent().GetParent() as CameraMovement. Both would yield the same result, and using signals in the editor is probably the cleanest way. I just wanted to show how you can use the singleton design pattern in Godot using auto-load scripts.
3. Camera inertia should be multiplied by delta so it is a rate per second.
4. I forgot that I actually cut out the Goblin Shark speed modelling video from the last episode 🙃 I will append it to a future video.
🎶 Music tracks from:
- Mondo Loops x L'aiguille - Nature's Beauty
- Provided by Lofi Girl
- Watch: • Mondo Loops x Aiguille...
- Listen: open.spotify.com/album/3nVbqI...
__________________________________________
You can also visit me at:
WEBSITE 🌏 polysthetic.com
THREADLESS 🕶️ polysthetic.threadless.com
DRIBBBLE 🏀 dribbble.com/polysthetic
RUclips 🎥 / polysthetic
AUDIOMACK 🎼 audiomack.com/polysthetic Хобби
📻 Addenda:
1. Be sure to watch episode 2 if you'd like to see how the camera gimbals are controlled (ruclips.net/video/zflfXwy5Wk8/видео.html).
2. Alternative methods for connecting to the camera include using signals, or using GetCamera().GetParent().GetParent() as CameraMovement. Both would yield the same result, and using signals in the editor is probably the cleanest way. I just wanted to show how you can use the singleton design pattern in Godot using auto-load scripts.
3. Camera inertia should be multiplied by delta so it is a rate per second.
4. I forgot that I actually cut out the Goblin Shark speed modelling video from the last episode 🙃 I will append it to a future dev log.