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
@saulnores34772 жыл бұрын
I'd like to see a soccer game tutorial.
@toupocallen7572 Жыл бұрын
The same video in 3D?
@generrosity2 жыл бұрын
This is very cool! And I can see how this could be easily extended for 3d too. Thanks!
@mrelipteach2 жыл бұрын
Yeah it can easily be extended to 3D! I'm glad you see how :) Don't hesitate to share if you do it.
@brunodbrito2 жыл бұрын
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.
@mrelipteach2 жыл бұрын
Glad it was helpful!
@AndreaDoimo Жыл бұрын
Thank you! Was looking for animating the texture, and works in Godot 4!
@mrelipteach Жыл бұрын
Glad I could help!
@RayFlowerGames4 ай бұрын
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
@leothelaen19702 жыл бұрын
Great tutorial, thank you!
@EvaldoBratti10 ай бұрын
That was very clever, thank you
@mrelipteach10 ай бұрын
Glad you liked it!
@arandomperson123455 ай бұрын
To those doing this tutorial in Godot4.2 or higher, the collision.normal reference should now be a function collision.get_normal() instead.
@time608 Жыл бұрын
Very good Tutorial Thanks a lot 😊😊😊
@mrelipteach Жыл бұрын
Glad it was helpful!
@rakimo64932 жыл бұрын
Fantastic, thank you!
@mrelipteach2 жыл бұрын
Glad you liked it!
@ColorauGuiyino Жыл бұрын
Very useful, thank you for sharing.
@AgriasOaks992 жыл бұрын
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-software2 жыл бұрын
Yes, please. That would be great.
@fonar-pro2 ай бұрын
when you calculate the trajectory relative to a moving object and update it during movement, it is not possible to achieve an accurate view of the final trajectory. This takes into account the vector and the force of gravity relative to the predicted points. What algorithm should be used to calculate and update the trajectory of an already moving object?
@pashakurozeev55162 жыл бұрын
Hello! Please make lessons on creating fishing in godot!
@yuzu-dev2 жыл бұрын
Thank you!
@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
@mulberrytg7 ай бұрын
great tutorial! Thanks! I'm interested in how I could do something similar in 3D?
@mrelipteach7 ай бұрын
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?
@mulberrytg7 ай бұрын
@@mrelipteach thanks for your reply! I'll have to look into it more
@eanggawahyu10 ай бұрын
hi, this is very impressive ❤❤❤❤, interesting if you make a 3D tutorial, I would really like it
@braven40532 жыл бұрын
The same effect using vertex function: void vertex(){ UV.x -= TIME * speed; }
@mrelipteach2 жыл бұрын
Thanks for giving another solution!
@mrvodkins Жыл бұрын
also this solution don't ruin gradient. Thanks!
@dupasmokagaming70011 ай бұрын
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
@dupasmokagaming70011 ай бұрын
just found the trajectory line project - will check it out myself ;) thanks anyway!
@darkfield19529 ай бұрын
@@dupasmokagaming700 where did you find it?
@dupasmokagaming7009 ай бұрын
@@darkfield1952 I think he moved it to somewhere else
@amarrok801010 ай бұрын
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 ??😊
@mrelipteach10 ай бұрын
You need to instance an object and give it the same direction and speed as you're using for the path calculation
@amarrok801010 ай бұрын
@@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 ...
@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 Жыл бұрын
have you used the same shape for the kinematicbody used to predict the collisions?
@-Solenya Жыл бұрын
Very cool thank you! Is there a way to do this on a top down 2d game?
@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
@mrmikojo573810 ай бұрын
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.
@TheAlison1456 Жыл бұрын
Thanks.
@mrelipteach Жыл бұрын
You're welcome
@amarrok801011 ай бұрын
hola muy buen video pero no lo encuentro en el github, alguna idea ?
@mrelipteach11 ай бұрын
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
@amarrok801011 ай бұрын
@@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 ?
@hungp.t.9915 Жыл бұрын
hmm, 3.5.2 texture doens't repeat (I cloned the git)
@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 Жыл бұрын
@@mrelipteach Oh I found it, dotted_line.png > Import tab > Texture > Flags > Repeat = Enabled ====== I think you mean Repeat in the import tab
@Jhonbxl9 ай бұрын
For those wanting to do this under Godot 4, the repeat property has been moved kzbin.info/www/bejne/mpynh4Wvfc-tm6s
@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
@rafatokarczyk6904 Жыл бұрын
my trajectory line doesn't even show up... please help me
@realjames1 Жыл бұрын
same here, no idea why
@rafatokarczyk6904 Жыл бұрын
@@realjames1 like i watched the whole video about 5 times to find my mistake but i couldn't find it
@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
@israelsidharta Жыл бұрын
Does it work with godot4?
@mrelipteach Жыл бұрын
You'll probably have to adapt a few things as it was made for Godot 3.5 but it's very similar yes
@JasonEllingsworth Жыл бұрын
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.
@TheStickofWar5 ай бұрын
That's the application of math in the real world for you
@alonzo_go Жыл бұрын
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 Жыл бұрын
It's on the nodes themselves now. You'll find the same options under "texture" on your line2D