Godot 4 Builtin Drag and Drop System | How to Use

  Рет қаралды 5,473

Chevifier

Chevifier

Күн бұрын

Пікірлер
@grzegorzpedrycz2630
@grzegorzpedrycz2630 10 ай бұрын
Awasome tutorial as always !
@magicwalakaammagic
@magicwalakaammagic 4 ай бұрын
This is super fantastic and informative tutorial. I was expecting that you will also upload tutorial for the more complex game, you mentioned at the end of the tutorial. I am still anxiously waiting for this tutorial. MANY thanks in advance.
@Chevifier
@Chevifier 4 ай бұрын
I did Grid based Inventory tutorial. Thank you🙂
@samuraikina5908
@samuraikina5908 10 ай бұрын
Great video 🔝
@ShiloBuff
@ShiloBuff 10 ай бұрын
Subscribed for the great feedback from you. Looking forward to more content.
@Chevifier
@Chevifier 10 ай бұрын
Thank you😅
@snaker90
@snaker90 6 ай бұрын
Helpful, Thank you!
@thesomeone2nd
@thesomeone2nd 10 ай бұрын
Can you explain how do you remove the old texture when you place the circle in the circle slot? How does the circle back gets deleted? Because I wanted to try and recreate this system myself and it works but the texture remains back.
@Chevifier
@Chevifier 10 ай бұрын
The way im doing it in my project is to just have a blank texture rect as a child of the background texture then give it the item texture when I drag on it. Set it to null otherwise
@thesomeone2nd
@thesomeone2nd 10 ай бұрын
@@Chevifier in which function should do you add this though? And it's the same one you set the null let's say?
@hannahrogers1946
@hannahrogers1946 4 ай бұрын
This is a great tutorial, but I'm really sturggling with fixing the offset, do you have any advice? I've read through the comments and I'm having no luck applying it!
@Chevifier
@Chevifier 4 ай бұрын
Put it on a control node the offset the sprite then add the control node as the preview. so: var prev = Control.new() prev.add_child(tex_rect) #if you know the half size just type it in tex_rect.position = Vector2(-tex_rect.size.x/2,-tex_rect.size.y/2) set_drag_preview(prev))
@malxd8404
@malxd8404 9 ай бұрын
Onde a variavel texture de get_drag foi declarada???
@Chevifier
@Chevifier 9 ай бұрын
es la textura del nodo TextureRect que el script está extendiendo
@malxd8404
@malxd8404 9 ай бұрын
tks man!!! @@Chevifier
@muhammadumair3719
@muhammadumair3719 6 ай бұрын
will this work for mobile touch?
@jasonwilliams8730
@jasonwilliams8730 10 ай бұрын
👍
@yusarimahubara
@yusarimahubara 9 ай бұрын
You can tell the truth if you want, that you have no idea how to solve the offset when using drag instead of "for this tutorial I'm just gonna skip it'
@Chevifier
@Chevifier 9 ай бұрын
Thanks for the feedback. You can just use another control node as the parent then offset the child's position by half its size. But it felt very hacky so I didnt want to include it in the tutorial.
@yusarimahubara
@yusarimahubara 9 ай бұрын
@@Chevifier The control node in the drag was always (0, 0) and any position or rect size give me zero. I solved it because I know the size of my texture divided by 2 and applying it as a negative vector like Vector2(-16. -16) but yes, it feels a bit tricky.
@Chevifier
@Chevifier 9 ай бұрын
​@@yusarimahubaraWe could request that they update the set drag previous to include an optional offset Vector. But its not really a need imo i.e set_preview(control:Conrol, offset=Vector2(0,0))
@VIBrunazo
@VIBrunazo 5 ай бұрын
I solved it with just 3 lines of code more than the video. Just set global_position of a child TexRect to the globla_position of the original TexRect: var preview: Control = Control.new() var tex: TextureRect = TextureRect.new() tex.texture = texture preview.add_child(tex) tex.set_deferred("global_position", global_position)
@Foxion7
@Foxion7 2 ай бұрын
Dude, chill
How to use Resources in Godot 4
8:08
Bitlytic
Рет қаралды 6 М.
How to Use CLASSES in Godot 4 (everything to know)
12:51
DevWorm
Рет қаралды 30 М.
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
КОНЦЕРТЫ:  2 сезон | 1 выпуск | Камызяки
46:36
ТНТ Смотри еще!
Рет қаралды 3,7 МЛН
"Идеальное" преступление
0:39
Кик Брейнс
Рет қаралды 1,4 МЛН
I recreated Balatro's effects in Godot
8:04
MrElipteach
Рет қаралды 49 М.
Smooth Drag N Drop: Godot Guide
9:28
Bramwell
Рет қаралды 50 М.
How Do Game Devs NOT Overscope??
9:04
Green Light Dev
Рет қаралды 10 М.
Godot Scripts I add to Every Game
12:34
Aarimous
Рет қаралды 57 М.
So I Made A Water Shader In Godot 4 And It Was Quite Simple
11:32
I made a game using Godot for the first time
7:35
shawcat
Рет қаралды 1,4 МЛН
How 10 Mods Completely Changed the Fate of My City! | SB 5
39:45
City Planner Plays
Рет қаралды 73 М.
Godot @export - Everything You Need to Know
6:22
DashNothing
Рет қаралды 31 М.
How To Drag And Drop In Godot - Basic Level Explanation
6:16
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН