Touch Camera Controls with C# and Godot [Andromedoom Dev Log 3]
Polysthetic
๐พ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 https://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:
- Be sure to watch episode 2 if you'd like to see how the camera gimbals are controlled (https://youtu.be/zflfXwy5Wk8).
- 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.
- Camera inertia should be multiplied by delta so it is a rate per second.
- 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: https://www.youtube.com/watch?v=R4FEaeOZqAo
- Listen: https://open.spotify.com/album/3nVbqIZAmRpGcZsGEnRW7i
You can also visit me at: WEBSITE ๐ https://polysthetic.com THREADLESS ๐ถ๏ธ https://polysthetic.threadless.com DRIBBBLE ๐ https://dribbble.com/polysthetic YOUTUBE ๐ฅ https://youtube.com/c/polysthetic AUDIOMACK ๐ผ https://audiomack.com/polysthetic ... https://www.youtube.com/watch?v=z6YY8G5a4sw
184974206 Bytes