How to make a 2D Camera Pan & Zoom in Godot 4

  Рет қаралды 4,344

Real Robots

Real Robots

Күн бұрын

Пікірлер: 28
@SoggyNoodle9
@SoggyNoodle9 4 ай бұрын
As some one involved with rimworld for a long time it's really fun to see a tutorial based on it, I'm glad you're taking the time to make the functions act the way you want them too and you explain it great while at it as well!
@mrussogamedev
@mrussogamedev 4 ай бұрын
YES for the edge detection for camera/mouse please! Really curious to see it handling a procedural generated like this one.
@sphynxcolt4030
@sphynxcolt4030 4 ай бұрын
Very nice tutotial! Camera movement & zoom is so important. Super cool that you did not just call it a day with the snappy zoom and panning, as maybe most would have, but even added camera smoothing. Really looking forward to what comes next :D
@WorkshopWizard
@WorkshopWizard 4 ай бұрын
next video ideas: -Grid based object placement| -Terrain layers that dictate impassable movement (touched already in video 2) -Object generation within terrain generation for resources -UI -Animations for the world/objects/pawns Love these videos man, keep it going!!
@ShadyFoxShadify
@ShadyFoxShadify 4 ай бұрын
SO many yasss for the grid object placement tutorial, especially for isometric ones.
@definitelyturok
@definitelyturok 4 ай бұрын
Been looking for a series like this for godot for quite some time, thanks for doing this, much appreciated
@MuffinMan_Ken
@MuffinMan_Ken 3 ай бұрын
When you're binding keys in the Input Map, right after clicking the +, you'll see it says "Listening for input...". At this point you can just press any key you like and it'll be bound. It's a lot more convenient than going through the complete list of keys each time.
@FatMiddleAgedMan
@FatMiddleAgedMan 4 ай бұрын
You have an excellent way of explaining things and fantastic pacing! Loving this series so far - keep up the amazing work! :D
@argonbart
@argonbart 3 ай бұрын
Underrated video! Calm and simple explanation, good pace to follow along. Enjoyed it a lot, thank you! ♡
@paulturner7988
@paulturner7988 Ай бұрын
Great little tutorial, and easy to follow with great explanations. This is exactly what I was looking for as I've not used Camera2D properly (yet!) but will simplify what I was doing by manipulating node scale and position directly (yes, I know that's the bad way!)
@brunch1572
@brunch1572 4 ай бұрын
Great video. I love the series. I made a couple modifications that I thought I'd share with anyone interested. The first is setting limits to zooming in and out. The second is making it so that in order to drag the camera, you must hold the drag toggle (space bar in my case) and then left click and drag. This functions like the Godot 2D editor and also like Aseprite. Zoom limits: 2 new variables and modified zoom_camera function var zoom_min: Vector2 = Vector2(0.1, 0.1) var zoom_max: Vector2 = Vector2(5.0, 5.0) func zoom_camera(delta): if Input.is_action_just_pressed("camera_zoom_in"): zoom_target *= 1.1 elif Input.is_action_just_pressed("camera_zoom_out"): zoom_target *= 0.9 zoom_target = clamp(zoom_target, zoom_min, zoom_max) #
@real_robots
@real_robots 4 ай бұрын
Zoom limits are a great idea, I can't believe I forgot to add those in
@CoFloCipher
@CoFloCipher 4 ай бұрын
Happy to see another video. I’m loving this series so far! One small suggestion - try zooming in the view when writing code and when showing small ui elements. This can be done in post if you don’t remember to while filming. Again, awesome job so far and I can’t wait to see more!
@real_robots
@real_robots 4 ай бұрын
Thanks, I had the same comment on a previous video and then I completely forgot to do anything about it with this one. Next video is going to have big chunky text, I promise!
@signet2712
@signet2712 4 ай бұрын
Great tutorial series and explanations! Please keep it going!
@WilliamB383
@WilliamB383 2 ай бұрын
Excellent tutorial. Thank you very much
@babbdi
@babbdi 4 ай бұрын
damn thats good material stuff
@DejaimeNeto
@DejaimeNeto 4 ай бұрын
yes
@nathanrohde3440
@nathanrohde3440 2 ай бұрын
@katherine2721 already pointed out using _input(event) instead of process. For me this resolved a situation where my UI would shake as I was dragging the rest of my screen around. My UI is placed as a child of the Camera2D to resolve issues with zooming
@tayete
@tayete 13 сағат бұрын
Fantastic tutorial! Thank you so much!!!
@kaitygames
@kaitygames 3 ай бұрын
More? Yes, please. I can tell that you will be bigger than everybody else in the game development world here in KZbin. Please keep up and remember the wise words: "Never give up; Never surrender."
@S-B-O
@S-B-O 17 күн бұрын
Can you convert this project to touch events? Please!😢
@katherine_elle
@katherine_elle 4 ай бұрын
Sorry but is there a reason to put this in the process function instead of _input(event) function?
@real_robots
@real_robots 4 ай бұрын
Nope, not any good one. Only that I tend to prefer understanding my code a tick at a time and find events strange and confusing :-)
@katherine_elle
@katherine_elle 4 ай бұрын
@@real_robots That makes sense. I get a bit paranoid about multiple checks every tick (even though I doubt it's a real problem unless it's hundreds or thousands of nodes) so I try to put fewer things in process. But great series, keep going! Especially since I'm replaying Rimworld because of the anomaly update!
@jakes-dev1337
@jakes-dev1337 4 ай бұрын
The terrain generates multiple times on click, so thats perfectly reasonable​@@katherine_elle
@omeed9015
@omeed9015 4 ай бұрын
Thanks so much for taking the time to post these!
@JFLEEC
@JFLEEC 4 ай бұрын
nice !
How to make an Item System in Godot 4
36:15
Real Robots
Рет қаралды 2,4 М.
How to use Classes in Godot! - Intermediate Tutorial
8:46
БЕЛКА СЬЕЛА КОТЕНКА?#cat
00:13
Лайки Like
Рет қаралды 2,1 МЛН
Ozoda - Lada (Official Music Video)
06:07
Ozoda
Рет қаралды 11 МЛН
Офицер, я всё объясню
01:00
История одного вокалиста
Рет қаралды 3 МЛН
Custom Resources in Godot 4 and How to use them
9:36
Unain
Рет қаралды 11 М.
circuitpython hid gamepad
3:21
CodeKick
Рет қаралды 86
Tweens are AMAZING in Godot 4.3
27:44
Cashew OldDew
Рет қаралды 6 М.
The Art of JRPG Design | Genre Essence
13:28
The Game Overanalyser
Рет қаралды 10 М.
Path Creator (free unity tool)
10:29
Sebastian Lague
Рет қаралды 410 М.
How to Make a Good 2D Camera
11:38
Game Maker's Toolkit
Рет қаралды 406 М.
Easy UI Animation in the Godot Engine
15:31
StayAtHomeDev
Рет қаралды 9 М.
Godot Tile Maps Are Dead ...Long Live TileMapLayers
11:02
Gamefromscratch
Рет қаралды 40 М.
БЕЛКА СЬЕЛА КОТЕНКА?#cat
00:13
Лайки Like
Рет қаралды 2,1 МЛН