its not working :( Edit: I fixed it, but now the raycast im using for bullet shots is always jittering
@NealHoltschulte5 күн бұрын
I'm not sure why that may be. You might check to see if the turret rotates a fixed amount toward its target or checks to see if it can rotate less than that amount to face the target directly. I don't remember if I implemented that for this project or not, but jitter can be caused by over-rotation one way, then over compensation back the other way.
@Indr1DC01D6 күн бұрын
Americans should do this
@loyan.k10 күн бұрын
字字珠璣,句句真理❤
@hamzaomar643710 күн бұрын
how can I get this code script do you have a discord or something?
@NealHoltschulte10 күн бұрын
Code used in this video: drive.google.com/file/d/1d2henQNl1O6aFFfYLvuLDUrBJzGZmoc7/view
@NealHoltschulte10 күн бұрын
Code used in this video series: drive.google.com/drive/folders/1G2EKVimWhjRacAEMl_K9yMtcvAFf0xkm?usp=drive_link
@AFCbailey27 күн бұрын
“Get an excuse book and FILL IT with excuses” Lmfao 🤣
@雏草寄Ай бұрын
Looks interesting
@historicallyelaineАй бұрын
Yo, this is pretty fantastic. I implemented my own solution for this in a small game I released in 2020, and this is waaaaaaaaay better. If I ever get around to continuing work on the sequel, I'll probably implement your method over re-implementing my old one. Cheers~
@thatsnew2041Ай бұрын
why is it 2*delta the 95% prediction?
@NealHoltschulteАй бұрын
You can think of delta like a radius or standard deviation. The full width (diameter) is 2*radius. Looking at the normal curve, 95% of normally distributed values are within + or - 2 standard deviations of the mean, but that means the total width is 4, +2 on the right and -2 on the left. Hope that helps.
@octagearАй бұрын
Out of curiosity are you using any specific design patterns or best-practices when designing the composition of objects and scripts? Like i've scrambled though the source code and noticed that my goto folder structure and component assembly looks rather different
@NealHoltschulteАй бұрын
Seems like there's two basic approaches to folder structure. As I recall, I'm using the second one: kzbin.info/www/bejne/p5WrfZKEjdxpiqs
@NealHoltschulteАй бұрын
I think this video is great: How You Can Easily Make Your Code Simpler in Godot 4 kzbin.info/www/bejne/bWXcZ62Nj8uEgc0
@NealHoltschulteАй бұрын
Beyond those two other links I gave, I'm just doing my best to decouple components, follow the single responsibility principle, and not repeat myself. Here I describe a code pattern that has been important for organization: www.reddit.com/r/godot/comments/1gyhxqg/comment/lyoy32c/
@MacilatthefrontАй бұрын
I think you missed a great opportunity for an “ass-teroid” pun.
@NealHoltschulteАй бұрын
🤦♂
@denizo9263Ай бұрын
I'll never even think about using kamikaze chasis without even a single defense perk.
@NealHoltschulteАй бұрын
It's like flying a papier mache space ship.
@NealHoltschulteАй бұрын
Git hub link to project: github.com/nealholt/space-shooter-3d Explosion visual effect: kzbin.info/www/bejne/o5q0aHeFZraIjKc Pretty 3D Space Level Design: kzbin.info/www/bejne/aYepfWBphrqeo6c Fighter engine audio source: imgur.com/gallery/f-18-carrier-catapult-assisted-takeoff-JcPruZg Other misc audio: www.leshylabs.com/apps/sfMaker/
@diegograterol91052 ай бұрын
thank you so much for making i thought i would fail, now i might have a chance
@grzegorzgrzelczyk2 ай бұрын
Super useful in my project. Don't see a donate button? On other note the project that is linked in a zip doesn't seem to be working properly, but the one from github is gold.
@NealHoltschulte2 ай бұрын
I may have made an adjustment and forgotten to update the zip. Thanks for the comment. No donations at this time. Perhaps in the future.
@jonjones89892 ай бұрын
Thanks for the help and information in this video! Extremely educational with the scripts available for download as well.
@Sticknbkid2 ай бұрын
“Do the least amount of work without getting tired and do nothing” 😂😂😂
@becauseyoudeserve216813 күн бұрын
I understood without getting fired😂
@stevenstemmler75732 ай бұрын
This is great fun to see - I have to go back and watch part one again. Thank you for referencing the tutorials you are using as well as showing your code and how it is all coming together. Godot now has an app you can use in the Quest VR headsets so I figure it is a good time to learn Godot - and this is exactly the kind of project I love! (We always need more space sims!)
@NealHoltschulte2 ай бұрын
Git hub link to project: github.com/nealholt/space-shooter-3d Udemy course where I got the idea for the weapon handler: www.udemy.com/course/complete-godot-3d/learn/lecture/41204698 This course gave me a boost when I was just getting started, but it may not be suitable for more experienced Godot programmers. Bullet hole decal tutorial: kzbin.info/www/bejne/bqepgIKdobyKadk Projectile ray tutorial, including how to ricochet: kzbin.info/www/bejne/oKCwc4mllL-qgas How to calculate target leading: kzbin.info/www/bejne/kJuwm6uglMefg7M Physics seek controller get velocity adjustment resources: kzbin.info/www/bejne/poO8fqxrqraGptE with a great deal of help from this one kzbin.info/www/bejne/mZi5f6hrYpyZZtk&ab_channel=IndieQuest to make it work in 3d
@NealHoltschulte2 ай бұрын
For those of you still struggling, I'm sorry, I'm not planning on updating this video any time soon. However, I have found this site, which was super easy to use and got me an older version of Java: www.openlogic.com/openjdk-downloads
@greg773893 ай бұрын
"Mom can we get Helldivers?" "No we have Helldivers at home." Helldivers at home:
@deanp29203 ай бұрын
Tysm!
@Puppetboe3 ай бұрын
Can you possibly make a print out of your liberator design it looks amazing
@NealHoltschulte3 ай бұрын
It's not a printout, but I'm feeling lazy. This was my inspiration: i.imgur.com/VBxafE1.jpeg from this post here: imgur.com/gallery/helldivers-cosplay-DIpQq
@NealHoltschulte3 ай бұрын
It's important to make it stocky. Not all my layers are the same. The stock itself has extra cardboard on each side. Also athletic tape (the kind hockey players put on their sticks to grip them better) was used on the handle, stock, and forward grip for that authentic look. Beyond that, use the more expensive paint. The cheap stuff is too watery and requires a billion layers and still looks like crap.
@Puppetboe3 ай бұрын
It looks good and thanks for the information
@ultimate_frisbee_tomorrow3 ай бұрын
this was so helpful! I was getting confused on whether or not the break ended the if statement or the loop, and now I know it ends the loop. thank you!
@JustRegular288983 ай бұрын
If u order a 3D printed suit do u have to 3D print ur self?
@NealHoltschulte3 ай бұрын
Depends on whether you order it pre-printed or you're just ordering the blueprint to send to the printer. Both types are available online.
@To-mos3 ай бұрын
Thanks for the tutorial, I initially went with your setup before a refactor and this was my solution in the long run. func look_at_angle_from_offset(parent_transform: Transform3D, gun_pos: Vector3, focal_point: Vector3) -> Vector2: var local_offset := parent_transform.basis.inverse() * (focal_point - gun_pos) var bearing := wrapf(-atan2(local_offset.x, -local_offset.z), -PI, PI) # -PI to +PI with 0.0 forwards # re-localize the offset so the math is from the perspective of the bearing local_offset = Quaternion.from_euler(Vector3.UP * bearing).inverse() * local_offset var elevation := atan2(local_offset.y, -local_offset.z) return Vector2(bearing, elevation) Made a slerp step function for animation, most turrets interpolate the bearing and elevation separately but I feel it looks unorganized. This slerp approach combines the two angles and does the interpolation at the same time making the machine feel more professional and tuned in my opinion. (rot_step: float is delta*rot_speed) func slerp_step(cur_yaw: float, cur_pitch: float, targ_yaw: float, targ_pitch: float, rot_step: float) -> Vector2: # Combine yaw and pitch into a single quaternion var current_rotation = Quaternion(Vector3.UP, cur_yaw) * Quaternion(Vector3.RIGHT, cur_pitch) var target_rotation = Quaternion(Vector3.UP, targ_yaw) * Quaternion(Vector3.RIGHT, targ_pitch) # Perform SLERP on the combined quaternion var rot_dist = current_rotation.angle_to(target_rotation) var step = rot_step / rot_dist if rot_dist > 0.0 else 1.0 var new_rotation = current_rotation.slerp(target_rotation, min(step, 1.0)) var new_euler = new_rotation.get_euler() # desconstructed output return Vector2(new_euler.y, new_euler.x) # yaw, pitch
@NealHoltschulte3 ай бұрын
Thank you for sharing. This is awesome.
@agentp41723 ай бұрын
Hell yeah
@bigboyskater-koi3 ай бұрын
for the visor id use one of those binder or folder seperators
@NealHoltschulte3 ай бұрын
Absolutely. I did have options for the visor, but it was already a very warm costume and I felt like I needed the ventilation!
@bigboyskater-koi3 ай бұрын
@NealHoltschulte yeah I get that, I have the whole 3d printed rig and that's hot without the helmet
@tehpyono22033 ай бұрын
Might not be exactly relevant, but if I import a 3d model from say Maya, does the turret need rigging for it to move like what you shown at the start? (turret elevation and rotation) Also, I assume any animations done would not be useful in this case as the turrets don't exactly "play" any predefine animations unless you make one for firing?
@NealHoltschulte3 ай бұрын
Not having imported models from Maya, I'm not sure. You definitely need the head + body node3Ds to give rotation instructions to. And I did not add any animations to the turrets demonstrated here.
@AnitaBrasher3 ай бұрын
This is my hero!!!!
@stevenstemmler75733 ай бұрын
Thank you for this! I'm looking forward to following along on this journey! Maybe this is jumping too far down the line, but I would wonder about making multiple systems with actual stars in the skybox - much in the way Elite Dangerous allows you to lock on to a star and jump to it. At an early stage it could drop you into the same system, but eventually I would love to see how to not only spawn procedurally consistent systems, but then draw them in the skybox where they would be in the sky from the system you would be coming from.
@NealHoltschulte3 ай бұрын
Welcome and thanks! I love your idea and "procedurally" is certainly a buzzword that always entices me, but for the near to mid future I'm going to focus on the combat mechanics (and maybe audio/visuals)
@stevenstemmler75733 ай бұрын
@@NealHoltschulte In that case, I am wondering do you use a VR headset? Godot just launched on Quest! I am super excited to try to do some work on there and Space Sims are so amazing in VR (That is how I play House of the Dying Sun and if you have not tried Elite Dangerous in VR... the first time in that cockpit will blow your mind!)
@NealHoltschulte3 ай бұрын
@@stevenstemmler7573 Nah, I don't have a VR headset. Someday! I have tried it at a friend's house and was super impressed.
@NealHoltschulte3 ай бұрын
@@stevenstemmler7573 I don't have a VR headset, but I used one at a friend's house and was super impressed. I bet these space sims are awesome in one. Maybe someday! (ps I might have double replied to this, but the other reply wasn't showing up for some reason.)
@mohamedeldin27443 ай бұрын
thank you for your explanation Neal
@pascalcasier9593 ай бұрын
Thank you, very helpfull
@ДанилМартаков4 ай бұрын
Looks amazing, especially for someone with no experience in the field!
@NealHoltschulte4 ай бұрын
Thanks! I had time and good youtube tutorials (and my wife advising and doing fabric stuff).
@roberthamill86434 ай бұрын
Very nice example and explanation. Thank you for sharing
@galavaria364 ай бұрын
This is sooo helpful, Ive been struggling trying to figure out things on my own but not knowing what to do. I will check this out thoroughly
@NealHoltschulte4 ай бұрын
Great! And I've been pushing updates to the git repo. There's now the ability to switch weapons and 4 different weapons including: the gatling you see here, hitscan laser, hybrid hitscan projectile "laser shotgun", and laser-guided missiles!
@galavaria364 ай бұрын
@@NealHoltschulte that is awesome, I shall check it out!
@JeanMarieGalliot4 ай бұрын
The fastest method I found sa far is the Eratostenes sieve using a bitmap
@Shoutenkou4 ай бұрын
Thank you Mr. Singh!
@dannyeisenga4 ай бұрын
Thanks so much, this really helped me :) The case in which the bullet is slower than the target can be optimized a bit, though. Because `time` in that case is just 0, you end up multiplying the target velocity by 0, and then adding that to the target position. You can can simply return the target position instead, and you can even do the check before calculating a, b, and c. You can also check the squared bullet speed against the square length of the target velocity vector to skip the square root operation. You need the squared bullet speed later anyway, for calculating a. In my case I also added a check at the top of the method to simply return the target position when its velocity is approximately zero. Anyway, thanks again :) I first tried implementing a much longer function that I found on a gamedev website but I couldn't make that work. While I understand the principle I can't say I understand the math, but at least I have something working now :)
@NealHoltschulte4 ай бұрын
Thanks!
@NealHoltschulte4 ай бұрын
All code is available for free on GitHub! github.com/nealholt/space-shooter-3d
@arekkubiak59574 ай бұрын
Hell yea, been waiting for it
@NealHoltschulte4 ай бұрын
I love this energy.
@mattjones80894 ай бұрын
Insanely helpful. I was really unhappy with many turret tuts I'd found and this one was not just what I needed, but so thorough in the explanation. I'm still wrapping my head around some of how it functions, but I have it implemented nicely. My Corvettes now have ferocious CIWS stations to deter you from casually blasting in their bridges, Gundam-style.
@NealHoltschulte4 ай бұрын
Awesome! I'm so glad to hear it.
@FlyingSoHighnow5 ай бұрын
i fucking love it
@jiho985 ай бұрын
Thank you for doing this series. I was wondering if you also mention explicit plot, implicit plot, and parametric plot later in the series?
@NealHoltschulte5 ай бұрын
@@jiho98 yes, I do but the plotting material is spread out. I’m not sure which video or videos covers those topics, otherwise I’d link you to them
@rexoverwatch5 ай бұрын
nice!
@jiho985 ай бұрын
What happens if you want to find the value 23 but you don't know the index within the array?
@NealHoltschulte5 ай бұрын
You can use find to get the index of what you want to find and then turn around and use the indexes to get the corresponding values: a = [1 5 7 23 7 8 3 46 23 2 46 7 4 5] locations = find(a==23) values = a(locations)
@Stefano-v-s5v5 ай бұрын
Puedes crear un script nuevo de multibox
@NealHoltschulte5 ай бұрын
@@Stefano-v-s5v que es un script de multibox? (I don’t speak Spanish, but I’m using Google translate)
@NealHoltschulte5 ай бұрын
All code is available on github: github.com/nealholt/TurretGodot Check out my other videos on target leading kzbin.info/www/bejne/kJuwm6uglMefg7M and compensating for bullet drop: kzbin.info/www/bejne/fqvKoGiAp5eaf5Y
@NealHoltschulte5 ай бұрын
All code is available on github: github.com/nealholt/TargetLeadExample This follow-up vid explains the off center shots and adds compensation for bullet drop: kzbin.info/www/bejne/fqvKoGiAp5eaf5Y
@NealHoltschulte5 ай бұрын
Complete code is available here: github.com/nealholt/TargetLeadExample Previous target-lead video is here: kzbin.info/www/bejne/kJuwm6uglMefg7M