Since this video get more views than I expected, so I decided to claim how I create this. It's really simple, just imagine a sphere whitch center is the player camera's location, and the attack Hitbox's starting point is the player camera, the end point is one point on the sphere. Then the first question : How to get this point, here is a guide about opengl sphere www.songho.ca/opengl/gl_sphere.html Here is the code I write to get this point func sphereVertics(radius:float, leftRightAngle:float, UpDownAngle:float, sphereCenter:Vector3)->Vector3: leftRightAngle = deg_to_rad(leftRightAngle) UpDownAngle = deg_to_rad(UpDownAngle) # x = (r * cosϕ) * cosθ # x = (r * cosϕ) * sinθ # z = r * sinϕ var x = (radius * cos(UpDownAngle)) * cos(leftRightAngle) var y = (radius * cos(UpDownAngle)) * sin(leftRightAngle) var z = radius * sin(UpDownAngle) return Vector3(x,z,y) + sphereCenter * NOTICE that there are 2 types of coordinate axes, you need to do some conversions if you want you use the formula in this website Then the second question is that how to spawn them in a arc. It's even more simple, just use for loop func spawnHitDetectionVertical(firstAng:float, endAng:float, Step:float, interval:float): for i in range(firstAng,endAng+1,Step): spawnHitVertical(i) # spawn function, just use raycast to spawn them according to the angle await get_tree().create_timer(interval).timeout # the delay after spawn every one of them This is just the vertical one (Pitchfork's first attack animation
No wonder why L4D2 has such fluid-feeling melee mechanics. It actually follows the arc of the attack rather than just attacking a point in the center of the screen or spawning a projectile
@@YoungeManly Every melee deal the same damage, also the damage is percentage : common 100% special except charger 100% charger 50%(head 100%) tank 5% witch 25%
@@wolfsmith9342 Did you change the title? I forgot the original, something alike "this dude stole L4D melee animations" wasn't it? Made you sound outraged over something that Valve actually doesn't mind and actually aproves of, given how many Half-Life'esk off brand games exist and they inspired. Being a copy cat is the biggest form of flattery. Well then everything is allight then isn't it. Sorry for not noticing your joke, honestly seemed you were serrious because you know ... nowadays ...
@@JanoschNr1 I am trying to make a zombie survivor game and I really like L4D2's melee hit detection, in fact, this is the best hit detection mechanic I have ever seen. So I decided to recreate it and improve it and use it in my game. And consider l4d2 source code never leaked, I guess it's leagal to use since I write all code myself
@@wolfsmith9342 Yeah, as said, all fine. As said even if you copy pasted the code 1to1 I don't think there would be a issue on any side anyways for previous mentioned reasons.
niceeee mechainics. Visually, I really wished you used something like an axe or bat for the weapon of choice tho. the pitchfork is by far the least apealling melee in the game for me
I wanted to get the baseball bat to fully show the X shape, but I can't import the bat's animation in blender ( Every time I import it it just messed up ) So I decided to use the pitchfork, since this is the only weapon that has 3 type of hit detection (the vertical one sucks XD)
@@roy7o9 :) please tell me why your apathetic copy/paste reply that counts as 'snark' is acceptable reply to condone my original snark. is this a 'fire with fire' thing. if it is. this only creates more fire. and as you can see. i wield it better than you do despite my dyslexia. should I point out that your daditute condemption ov my little outburst is meant to make me feel like a child and I should feel abash and chastised by the adult in the room turning their attention to me and looking down their nose from their proverbial high horse... do you feel better about engaging in this conversation? did you get the attention you think you deserved? what will you do with it now? something useful? or did you pull your willy out at the orgy before any girls showed up again? let me know when you wish to smother each other in idioms. my bag is full and you shall be found lacking. shalom
Since this video get more views than I expected, so I decided to claim how I create this.
It's really simple, just imagine a sphere whitch center is the player camera's location, and the attack Hitbox's starting point is the player camera, the end point is one point on the sphere.
Then the first question : How to get this point, here is a guide about opengl sphere www.songho.ca/opengl/gl_sphere.html
Here is the code I write to get this point
func sphereVertics(radius:float, leftRightAngle:float, UpDownAngle:float, sphereCenter:Vector3)->Vector3:
leftRightAngle = deg_to_rad(leftRightAngle)
UpDownAngle = deg_to_rad(UpDownAngle)
# x = (r * cosϕ) * cosθ
# x = (r * cosϕ) * sinθ
# z = r * sinϕ
var x = (radius * cos(UpDownAngle)) * cos(leftRightAngle)
var y = (radius * cos(UpDownAngle)) * sin(leftRightAngle)
var z = radius * sin(UpDownAngle)
return Vector3(x,z,y) + sphereCenter
* NOTICE that there are 2 types of coordinate axes, you need to do some conversions if you want you use the formula in this website
Then the second question is that how to spawn them in a arc. It's even more simple, just use for loop
func spawnHitDetectionVertical(firstAng:float, endAng:float, Step:float, interval:float):
for i in range(firstAng,endAng+1,Step):
spawnHitVertical(i) # spawn function, just use raycast to spawn them according to the angle
await get_tree().create_timer(interval).timeout # the delay after spawn every one of them
This is just the vertical one (Pitchfork's first attack animation
No wonder why L4D2 has such fluid-feeling melee mechanics. It actually follows the arc of the attack rather than just attacking a point in the center of the screen or spawning a projectile
When fighting zombies is not really smooth or fluid... Is janky as hell , is worse if you dont have an good ping...
Yeah, but valve's bad network code ruined it :(
This is also why you can attack multiple zombies at once when fighting them.
@@wolfsmith9342Netcode is hard man.
It's not like this, they use rays instead, this is actually better than l4d2
Pretty cool!
I still hate that fucking pitchfork tho
Which melee had more damage im still comparing shovel to forks
@@YoungeManly Every melee deal the same damage, also the damage is percentage : common 100% special except charger 100% charger 50%(head 100%) tank 5% witch 25%
It's the hitboxes problem,knife isn't helpful until Valve fixed the hitboxes and it's pretty good
You should use quaternions so that the attacking arc don't get smaller when you look up or down
My current goal is recreate it, next step is improve it.
Everytime I have no melee to be found I chose this and spin my mouse rapidly
Neat! Nice jobreconstructing it!
By Valves name, I'm offended on their behalf ...
The title is just a joke, I was just trying to make this mechanic in Godot
@@wolfsmith9342 Did you change the title? I forgot the original, something alike "this dude stole L4D melee animations" wasn't it?
Made you sound outraged over something that Valve actually doesn't mind and actually aproves of, given how
many Half-Life'esk off brand games exist and they inspired. Being a copy cat is the biggest form of flattery.
Well then everything is allight then isn't it. Sorry for not noticing your joke, honestly seemed you were serrious because you know ... nowadays ...
@@JanoschNr1 usually a clickbait title that for some reason is a trend with source games on youtube, especially TF2
@@JanoschNr1 I am trying to make a zombie survivor game and I really like L4D2's melee hit detection, in fact, this is the best hit detection mechanic I have ever seen. So I decided to recreate it and improve it and use it in my game. And consider l4d2 source code never leaked, I guess it's leagal to use since I write all code myself
@@wolfsmith9342 Yeah, as said, all fine. As said even if you copy pasted the code 1to1 I don't think there would be a issue on any side anyways for previous mentioned reasons.
its really cool, and i love the overly loud menu music that i can barely hear the "gameplay" sounds. (no hate tho)
cool stuff
rad!
So rad . gj 🔥🔥
Damn! Thats sick!
dude this is sick
niceeee mechainics.
Visually, I really wished you used something like an axe or bat for the weapon of choice tho. the pitchfork is by far the least apealling melee in the game for me
I wanted to get the baseball bat to fully show the X shape, but I can't import the bat's animation in blender ( Every time I import it it just messed up ) So I decided to use the pitchfork, since this is the only weapon that has 3 type of hit detection (the vertical one sucks XD)
dope
Now obliged by law port godot into source engine
coool... u should do a remaster of a campaign maybe ;D
Nah, then valve will be really angry about XD
Blood 1997 easter egg
imagine l4d2 have guts and blackplower attack arc mechanic
god please someone mod that in
this is cool may i use this for my left 4 dead inspired game am making using Godot?
This is totally fine, if you can't understand the pin comment, feel free to ask me for the source code !
@@wolfsmith9342 I understand it just asking for permissions but thanks
Valve games are great
我靠,前几天还在b站看到你嘞😀
See Mordhau for better melee mechanic.
recreated it with the worst melee on the game LOL
Since Port tools issue, I can only get the pitchfork's model. Others are messed up XD
I reckon the worst one is CSS knife, as I've heard
Nah, like the other commentor said the knife is the worst one since it undershoots your crosshair.
@@fruiteusfly5307 not anymore, it got updated so isnt the worst melee in the game now
@@StrobaCat Oh, I'll have to check out the hitboxes again then!
subbing because godot :'3
WOW! you did something someone else has already done! LATHER YOU IN PRAISE!
Forward to complacency....
Do you feel better about yourself now?
@@roy7o9 :) please tell me why your apathetic copy/paste reply that counts as 'snark' is acceptable reply to condone my original snark.
is this a 'fire with fire' thing. if it is. this only creates more fire. and as you can see. i wield it better than you do despite my dyslexia.
should I point out that your daditute condemption ov my little outburst is meant to make me feel like a child and I should feel abash and chastised by the adult in the room turning their attention to me and looking down their nose from their proverbial high horse...
do you feel better about engaging in this conversation? did you get the attention you think you deserved?
what will you do with it now? something useful? or did you pull your willy out at the orgy before any girls showed up again?
let me know when you wish to smother each other in idioms. my bag is full and you shall be found lacking.
shalom
And you did nothing, cry about it
@@nunyanunya4147how's the 8th grade going for ya