2D Animated Trajectory Line in Godot (with collisions!)

  Рет қаралды 21,857

MrElipteach

MrElipteach

Күн бұрын

Пікірлер: 65
@mrelipteach
@mrelipteach Жыл бұрын
I hope you like the video! Give me ideas on what you'd like to see next 👇 Checkout the sources github.com/MrEliptik/godot_experiments
@saulnores3477
@saulnores3477 Жыл бұрын
I'd like to see a soccer game tutorial.
@toupocallen7572
@toupocallen7572 Жыл бұрын
The same video in 3D?
@Jhonbxl
@Jhonbxl 6 ай бұрын
For those wanting to do this under Godot 4, the repeat property has been moved kzbin.info/www/bejne/mpynh4Wvfc-tm6s
@braven4053
@braven4053 Жыл бұрын
The same effect using vertex function: void vertex(){ UV.x -= TIME * speed; }
@mrelipteach
@mrelipteach Жыл бұрын
Thanks for giving another solution!
@mrvodkins
@mrvodkins Жыл бұрын
also this solution don't ruin gradient. Thanks!
@generrosity
@generrosity Жыл бұрын
This is very cool! And I can see how this could be easily extended for 3d too. Thanks!
@mrelipteach
@mrelipteach Жыл бұрын
Yeah it can easily be extended to 3D! I'm glad you see how :) Don't hesitate to share if you do it.
@RayFlowerGames
@RayFlowerGames Ай бұрын
For 3D what you can do instead is record all positions in a PackedVector3Array variable on your existing object with physics, append it with your positions while simulating physics the same way, then you have the option of drawing something at those points. You could draw a ball that animates going through that array, animating it by incrementing an index every process frame when drawn. Then just show/hide the meshes or whatever as necessary
@arandomperson12345
@arandomperson12345 2 ай бұрын
To those doing this tutorial in Godot4.2 or higher, the collision.normal reference should now be a function collision.get_normal() instead.
@TheAlison1456
@TheAlison1456 Жыл бұрын
timestamps for your video 0:33 Projectile 1:09 Trajectory 2:20 Collision 3:34 Texture 4:26 Animation Shader 6:23 Outro copypaste then delete this comment if u can
@eanggawahyu
@eanggawahyu 7 ай бұрын
hi, this is very impressive ❤❤❤❤, interesting if you make a 3D tutorial, I would really like it
@agriasoaks6721
@agriasoaks6721 Жыл бұрын
could you also make a tutorial about how to make the AoE of the impact? you know the red shape that indicates where the impact is going to be
@xtreme-software
@xtreme-software Жыл бұрын
Yes, please. That would be great.
@mulberrytg
@mulberrytg 4 ай бұрын
great tutorial! Thanks! I'm interested in how I could do something similar in 3D?
@mrelipteach
@mrelipteach 4 ай бұрын
Most of it is similar in 3D apart from the line drawing. AFAIK there's no easy way to draw a line like this. You have to use instant geometry but if you draw a line, you'll be limited in terms of thickness and stuff. The solution is to draw a line composed of triangle to control the thickness. Maybe you can find an addon to help with that?
@mulberrytg
@mulberrytg 4 ай бұрын
@@mrelipteach thanks for your reply! I'll have to look into it more
@isukwithnames1811
@isukwithnames1811 Жыл бұрын
Thanks for the tutorial it's super handy. My only question is How do I tweak this So I can make a startdew valley style fishing rod? My game is topdown Zelda style and not a side scroller/platformer style game
@leothelaen1970
@leothelaen1970 Жыл бұрын
Great tutorial, thank you!
@pashakurozeev5516
@pashakurozeev5516 Жыл бұрын
Hello! Please make lessons on creating fishing in godot!
@cashpay50
@cashpay50 Жыл бұрын
I'm having problem with this, my collision shape is an arbitrary shape. Whenever trajectory is display, it is so much different from the actual things shot out.
@mrelipteach
@mrelipteach Жыл бұрын
have you used the same shape for the kinematicbody used to predict the collisions?
@ColorauGuiyino
@ColorauGuiyino Жыл бұрын
Very useful, thank you for sharing.
@dupasmokagaming700
@dupasmokagaming700 8 ай бұрын
thanks buddy for the great vid! was looking for something like this for a while already. Just a question though - sorry if it's dumb I only started coding 3 weeks ago... ;D - so you put that variable 'dir' to the projectile script, but I assume it has to be updated somehow with your aiming method? like you move right or left to change the aim position (?) how it gets updated? Was looking for this project on github (link that you provided) but couldn't find it. Many thanks for the support mate! cheers
@dupasmokagaming700
@dupasmokagaming700 8 ай бұрын
just found the trajectory line project - will check it out myself ;) thanks anyway!
@darkfield1952
@darkfield1952 6 ай бұрын
@@dupasmokagaming700 where did you find it?
@dupasmokagaming700
@dupasmokagaming700 6 ай бұрын
@@darkfield1952 I think he moved it to somewhere else
@hungp.t.9915
@hungp.t.9915 Жыл бұрын
hmm, 3.5.2 texture doens't repeat (I cloned the git)
@mrelipteach
@mrelipteach Жыл бұрын
Make sure the texture is set to tile in the import tab and then on the line2D make sure under fill > texture mode to select Tile
@hungp.t.9915
@hungp.t.9915 Жыл бұрын
@@mrelipteach Oh I found it, dotted_line.png > Import tab > Texture > Flags > Repeat = Enabled ====== I think you mean Repeat in the import tab
@AndreaDoimo
@AndreaDoimo Жыл бұрын
Thank you! Was looking for animating the texture, and works in Godot 4!
@mrelipteach
@mrelipteach Жыл бұрын
Glad I could help!
@brunodbrito
@brunodbrito Жыл бұрын
thx dude! helped me a ton! i already had a trajectory predict on my game, but was sooooo bad and yours look so much cleaner.
@mrelipteach
@mrelipteach Жыл бұрын
Glad it was helpful!
@amarrok8010
@amarrok8010 7 ай бұрын
Como podria lanzar un objeto en esa direccion en ves de instanciarlo ? Intente pero en ves de lanzar simplemente lo suelta .. pero si lo instancio no tengo problema , alguna idea o manita ??😊
@mrelipteach
@mrelipteach 7 ай бұрын
You need to instance an object and give it the same direction and speed as you're using for the path calculation
@amarrok8010
@amarrok8010 7 ай бұрын
@@mrelipteach entonces Si o Si hay que instanciarlo , pero ahí es cuando tengo otro problemas y es que al instanciar el objeto , dicho objeto no tiene el script que debería tener ...
@time608
@time608 9 ай бұрын
Very good Tutorial Thanks a lot 😊😊😊
@mrelipteach
@mrelipteach 9 ай бұрын
Glad it was helpful!
@EvaldoBratti
@EvaldoBratti 7 ай бұрын
That was very clever, thank you
@mrelipteach
@mrelipteach 7 ай бұрын
Glad you liked it!
@innerdev
@innerdev Жыл бұрын
Does it work with godot4?
@mrelipteach
@mrelipteach Жыл бұрын
You'll probably have to adapt a few things as it was made for Godot 3.5 but it's very similar yes
@rafatokarczyk6904
@rafatokarczyk6904 Жыл бұрын
my trajectory line doesn't even show up... please help me
@realjames1
@realjames1 Жыл бұрын
same here, no idea why
@rafatokarczyk6904
@rafatokarczyk6904 Жыл бұрын
@@realjames1 like i watched the whole video about 5 times to find my mistake but i couldn't find it
@realjames1
@realjames1 Жыл бұрын
@@rafatokarczyk6904 found the issue, it turns out you can't run the update trajectory function outside the line2d, I had to just make a script and attach it to the line2d and it works fine
@-Solenya
@-Solenya Жыл бұрын
Very cool thank you! Is there a way to do this on a top down 2d game?
@mrelipteach
@mrelipteach Жыл бұрын
I don't see how that would work in a top down game as you see things only from above so you don't see the trajectory
@mrmikojo5738
@mrmikojo5738 7 ай бұрын
Add a shadow that follows along the ground in a straight line from the player and the spot where the first bounce lands. Then just don’t let it bounce around as much. It would need to stay near or along the same trajectory from the bounce to fake the top down perspective.
@yuzu-dev
@yuzu-dev Жыл бұрын
Thank you!
@amarrok8010
@amarrok8010 8 ай бұрын
hola muy buen video pero no lo encuentro en el github, alguna idea ?
@mrelipteach
@mrelipteach 8 ай бұрын
This was a Godot 3.x project so it's in the 3.x branch: github.com/MrEliptik/godot_experiments/tree/3.x/2D/trajectory_line
@amarrok8010
@amarrok8010 8 ай бұрын
​@@mrelipteach seria posible en ves de instanciar el objeto ( como si fuese una bala o similar ) aplicarle impulso ? Mi idea era lanzar mi objeto siguiendo la trayectoria de la línea pero sin instanciarlo , alguna idea ?
@alonzo_go
@alonzo_go 9 ай бұрын
how do I go about doing this in godot 4? in the texture reimport part, there's no "repeat" option in godot 4 therefore it only shows the image 1 time along the line...
@mrelipteach
@mrelipteach 9 ай бұрын
It's on the nodes themselves now. You'll find the same options under "texture" on your line2D
@rakimo6493
@rakimo6493 Жыл бұрын
Fantastic, thank you!
@mrelipteach
@mrelipteach Жыл бұрын
Glad you liked it!
@TheAlison1456
@TheAlison1456 Жыл бұрын
Thanks.
@mrelipteach
@mrelipteach Жыл бұрын
You're welcome
@JasonEllingsworth
@JasonEllingsworth 10 ай бұрын
oof this is not beginner friendly. Understandable that it is an intermediate thing and is quickly stated for someone more familiar with code, but I would have to try and dissect all this information down so I could understand why you are doing each thing, so I could replicate it in the future.
@TheStickofWar
@TheStickofWar 2 ай бұрын
That's the application of math in the real world for you
I recreated Balatro's effects in Godot
8:04
MrElipteach
Рет қаралды 35 М.
Верстка UI для гиперказуальной игры на Godot
13:36
Фронтенд Паштет
Рет қаралды 21 М.
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 9 МЛН
Ozoda - Lada ( Ko’k jiguli 2 )
06:07
Ozoda
Рет қаралды 15 МЛН
Новый уровень твоей сосиски
00:33
Кушать Хочу
Рет қаралды 5 МЛН
BETTER 2D visuals in 7 EASY TIPS
10:38
MrEliptik
Рет қаралды 70 М.
GODOT TUTORIAL: Shockwave shader for noobs
15:48
Nolkaloid
Рет қаралды 53 М.
An introduction to Raymarching
34:03
kishimisu
Рет қаралды 141 М.
Langton's Loops: The cellular automaton that copies itself
12:01
davbrdavbr
Рет қаралды 513 М.
A simple procedural animation technique
8:31
argonaut
Рет қаралды 391 М.
I Created My Own Custom 3D Graphics Engine
26:29
Inkbox
Рет қаралды 79 М.
Stop "learning" gamedev right now
17:00
MrElipteach
Рет қаралды 9 М.
My 6 FAVORITE Godot 4.3 features
8:34
MrElipteach
Рет қаралды 25 М.
How Games Make VFX (Demonstrated in Godot 4)
5:46
PlayWithFurcifer
Рет қаралды 346 М.
I Made My First Game in Godot in 3 Weeks...
26:21
Jack Sather
Рет қаралды 372 М.
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 9 МЛН