Creating a Flexible Touch Screen Camera Controller In Godot | Basics With Godot

  Рет қаралды 7,223

FinePointCGI

FinePointCGI

Күн бұрын

Subscribe and learn more from me about Game Development and Programming!
In this video, we discuss how to create a simple but very flexible touch camera! We build panning zooming and rotating!
RESOURCES
Project Repo: github.com/finepointcgi/Touch...
Tile Map: game-endeavor.itch.io/mystic-...
TEXT VERSION OF THIS TUTORIAL
finepointcgi.io/2023/06/16/bu...
BE MY FRIEND:
🐦Add me on Twitter: / finepointcgi
Check out my Website: finepointcgi.io/
Trello of Upcoming Tutorials: trello.com/b/cJWPaVyV/godot-t...
You can support me on Patreon: / finepointcgi
Hang Out with the Guys on Discord: / discord
TIMESTAMPS
00:00 - Start
00:31 - Getting Into Godot
01:07 - Adding in the Camera
04:31 - Setting Up Our Touch Checkers
05:15 - Handling Our Touch
07:50 - Handling Dragging To Move Our Camera
10:25 - Creating Zoom
14:41 - Creating a Limit Zoom
16:20 - Testing Zoom With a Problem
17:52 - Adding Rotation
19:03 - Explain Trig to You (Poorly)
21:33 - Fixing Our Rotated Pan Problem
22:41 - Outro
MUSIC
Music provided by TheRelaxedMovement.
Check it out here: / therelaxedm...​
HASHTAGS:
#Godot4 #CameraController #GameDev
ABOUT MY CHANNEL:
I've been a software developer for over 7 years. I've worked in the game industry for 3 of those years. This channel is used for news on the gaming\programming industry and for tutorials for game\programming development.
Updating Our Level Loading System With Feedback! Creating a Horror Game in Godot! C#

Пікірлер: 39
@sigitsatriap6505
@sigitsatriap6505 Жыл бұрын
love it, thanks !
@andriipopovich6704
@andriipopovich6704 11 ай бұрын
Very useful. Thank you!
@Theo_drawi
@Theo_drawi 8 ай бұрын
This helped me thank you so much!!!
@diogohipolito560
@diogohipolito560 11 ай бұрын
I am so glad I found your channel! It has literally everything I was looking for to build android games using Godot.
@hirochima26
@hirochima26 Жыл бұрын
your videos are awesome and you are awesome, you deserve a lot of respect and support :) keep up the good work
@JustMobileGames
@JustMobileGames 10 ай бұрын
Very helpful I am satisfied, thank you
@SkuriLP
@SkuriLP Ай бұрын
Amazing Tutorial thank you so much!
@guillermolmr
@guillermolmr 3 ай бұрын
Great tutorial!
@damianpinto9695
@damianpinto9695 5 ай бұрын
Gracias 🙏👍
@Nonoice
@Nonoice Жыл бұрын
It would be nice to do a tutorial on encryption of a Godot export to prevent people from being able from an .exe or an .apk to recover data from a godot project and steal the code
@FinePointCGI
@FinePointCGI Жыл бұрын
I will add it to my list!
@ProfesorRagequitlife
@ProfesorRagequitlife 7 ай бұрын
@FinePointCGI Is there a way to limit how far the camera can travel with dragging? I cant figure out a way to keep the camera from going way off the playing field, I would figure the "limits" tab in the camera inspector would do this, but the camera is plowing right through the limits like they arent even there.
@willwainwright7166
@willwainwright7166 5 ай бұрын
I figured this out last night (am no Godot expert so may be better way). Adding this here in case someone else is looking for it. I wanted to limit based off a background image size thats larger than the camera, I set the camera anchor mode to top left (so the min pan will be 0 for both x & y axis). Then I calculate the max pan by getting the background width and subtracting the viewport width / zoom; then same for height: e.g. width: var max_x_offset = background_size.x - (viewport_size.x / zoom.x) then clamp the offset: new_offset.x = clamp(new_offset.x, 0, max_x_offset)
@guillermolmr
@guillermolmr 3 ай бұрын
TIP: you can make the speed constant to the speed of your finger if you divide by the zoom: offset -= event.relative.rotated(rotation)/zoom * pan_speed
@guillermolmr
@guillermolmr 3 ай бұрын
There is a scale and pan on project settings now.
@Necriptos
@Necriptos 4 ай бұрын
This was great but I wish it also showed how to pan and zoom at the same time
@FinePointCGI
@FinePointCGI 4 ай бұрын
You are correct I'm not sure why I didn't cover that
@DexterFstone
@DexterFstone 9 ай бұрын
How about 3Dcamera? How do it?
@codewithmax
@codewithmax Жыл бұрын
Thanks! But why you don’t use clamp method for zoom limit?
@FinePointCGI
@FinePointCGI Жыл бұрын
Tbh I should have I wrote this tutorial really late last night so it's very likely that I just spaced on it lol
@codewithmax
@codewithmax Жыл бұрын
@@FinePointCGI it’s very good lesson
@ArabGameDev
@ArabGameDev 11 ай бұрын
hi @FinePointCGI' i made a shader that add light mask bcz it's removed in 4.0 can you improve it bcz it has artifacts?
@Nelcia1
@Nelcia1 6 ай бұрын
Hey, how do I add a limit on how much the camera can go? For example games like clash of clans or hay day has this boundary where camera gets stuck. I tried using the “limit” thing built in the editor. But it doesn’t work.
@jubibi390
@jubibi390 9 ай бұрын
hello~ may i know how did you integrate your mobile and PC? I'm also making a game for mobile.
@guillermolmr
@guillermolmr 3 ай бұрын
Why 2 current_angle? one global and one local?
@newtechnologystudios
@newtechnologystudios 7 ай бұрын
I'm having a little problem. I'm trying to create the same camera in a 3D scene, but I got a converted zoom (when I zoom it out, it grows on the contrary, and vice versa). Can you tell me how to fix this? Thank you for so useful tutorial.
@ibrahimbahalwan2972
@ibrahimbahalwan2972 6 ай бұрын
I also experienced the same. Did you somehow manage to find the solution?
@thetoyamostudio
@thetoyamostudio 7 ай бұрын
What if we only want to drag one direction? how can we make it? Thanks Sir.
@thetoyamostudio
@thetoyamostudio 7 ай бұрын
And how can we limit our pan area?
@Gostyr
@Gostyr 5 ай бұрын
"touch_points" not declared in the current scope. What i have to do with this
@FinePointCGI
@FinePointCGI 5 ай бұрын
Can I get a snippet of your code so I can see what it looks like? What version of Godot are you using
@Gostyr
@Gostyr 5 ай бұрын
@@FinePointCGI i started another project theese days, and deleated last project, so i am not able to send u snippet. Anyway have a good day
@PHDtt
@PHDtt 8 ай бұрын
is it possible to make a tutorial for 3D scene ?
@FinePointCGI
@FinePointCGI 8 ай бұрын
That is currently on my list! If you want let me know what you need and I will be more than happy to actually build it because that's on my list to be created soon.
@PHDtt
@PHDtt 8 ай бұрын
​@@FinePointCGIthanks u 😍, i needed a 3D navigation touch system similar to sketchfab (both Orbit and First person) , and if it will be possible to switch between them it will be amazing. the problem with sketchfab is when u switch to first person, it doesn't have any touch ui for navigation. also during navigation, if camera don't cross objects (collisions) it will be awesome. thank u again .
@PHDtt
@PHDtt 5 ай бұрын
@@FinePointCGI hope to see the video soon! 🙏
@FinePointCGI
@FinePointCGI 5 ай бұрын
@@PHDtt so im thinking about this. are we looking for a 3D isometric? or 3D first person? 3D person?
@PHDtt
@PHDtt 4 ай бұрын
@@FinePointCGI Thank u, 3D person would be great, something similar to sketchfab, using gestures to pan, move, zoom and rotate around 3d objects.
Creating a Crafting System! Creating a Horror Game In Godot 4!
1:06:01
How to Create Menus and Scene Transitions in Godot 4 - Godot Fundamentals
34:23
3 wheeler new bike fitting
00:19
Ruhul Shorts
Рет қаралды 31 МЛН
Stupid Barry Find Mellstroy in Escape From Prison Challenge
00:29
Garri Creative
Рет қаралды 13 МЛН
Каха инструкция по шашлыку
01:00
К-Media
Рет қаралды 8 МЛН
Pinch Zoom and Panning in Godot for a Mobile Game
14:14
Ombarus
Рет қаралды 10 М.
Creating a 3D Character Controller With Animations with Godot 4!
46:25
10+2 AWESOME ADDONS for GODOT 4
8:36
MrElipteach
Рет қаралды 121 М.
GODOT 4 ROOT MOTION MOVEMENT TUTORIAL
9:53
Brokencircuit
Рет қаралды 7 М.
Godot Recipe: Touchscreen Camera Control
8:25
KidsCanCode
Рет қаралды 12 М.
How Games Make VFX (Demonstrated in Godot 4)
5:46
PlayWithFurcifer
Рет қаралды 310 М.
Touch and Drag player movement for GODOT 2D! Tutorial#1
12:19
Abhrajit Ray
Рет қаралды 11 М.
Godot 3.1: 3D Camera Gimbal
15:55
KidsCanCode
Рет қаралды 27 М.
Phantom Camera For Godot Is Awesome!
10:27
Gamefromscratch
Рет қаралды 41 М.
3 wheeler new bike fitting
00:19
Ruhul Shorts
Рет қаралды 31 МЛН