I really started to prefer light mode after being forced to use it. I never switched back to dark after they made it optional. (' course I'm talkin' about Unity here)
This what I was looking for! Thanks for making tutorial about it. Also just a quick tip right click a node and find the "% Access as Unique Name" and click it, as this makes referencing nodes easier and useful because even when moving the node your reference to a different parent you wouldn't need to change the path for it. Almost forgot when this is toggled you have to use "%(Node's Name)" instead of "$(Node's Path)" or just drag and drop the node to the script.
I'm not super sure how this works, because the vertical raycast will always collide with the wall right after it fires from the first raycast's position...
True. But in this case, I make the raycast thicker so it will offset a little bit to touch the ledge. Or, you can just offset the Z position a bit forward.
@@bezoika4594 var tween = create_tween() tween.tween_property(self, "position", platform.global_transform.origin, 1, ).set_trans(Tween.TRANS_LINEAR).set_ease(Tween.EASE_IN_OUT) Tweens self position to a variable called platform in 1 second
No. That Y offset is for the origin of second raycast, not the ledgepoint. You can get any height you want from that second raycast hitpoint as long as it within that Y value offset.
@@Brokencircuitboard I don't understand how this second ray hits anything, it is on the *side* of a box, and it hits nothing because .. its on the side. Or is this raycast *inside* the box and it hits the upper most side of the box? In the video you are visualizing it as if the ray is on the outside, that's why I'm confused.
1) 1st raycast hit the box forward. We got 1st hitpoint. 2) We offset Y value of 1st hitpoint. now, we got origin of 2nd raycast position. This is the confusing part. 3) Only then we create 2nd raycast. the position of the 2nd raycast is AT Y offset we make previously. 4) We point 2nd raycast downward, whatever that raycast hit, we got our ledge point. and yes, 2nd raycast is outside of the player. I created empty node to hold the 1st raycast hitpoint.
@@Brokencircuitboard if you point the 2nd raycast downward, wouldn't that just hit the 1st point again? Why would it be stopped by the box? It is on the same x,z position as the 1st point, which is stopped by the box. Don't you need a small offset at x or z to account for that?
@@semaph0re Ah, i see what you mean. by right it shouldn't hit, but since you can set the raycast thickness in godot, it will barely hit. Or, just offset Z value. I don't bother doing that in this video, since it work for me 😅
The fact this guy has light mode on is criminal
Sorry if the light mode blinding your eye. I've got condition in which i cannot use dark mode for too long.
@@Brokencircuitboarddude that's suck, hope you doin well. You did great tutorial 👍
@@Sp1cyP3pp3r thank you
I really started to prefer light mode after being forced to use it. I never switched back to dark after they made it optional. (' course I'm talkin' about Unity here)
Didn't realize it would be that easy! TYVM
this answered a question i was dreading creating the answer for in the future
many thanks
This what I was looking for! Thanks for making tutorial about it. Also just a quick tip right click a node and find the "% Access as Unique Name" and click it, as this makes referencing nodes easier and useful because even when moving the node your reference to a different parent you wouldn't need to change the path for it. Almost forgot when this is toggled you have to use "%(Node's Name)" instead of "$(Node's Path)" or just drag and drop the node to the script.
Thanks! That is useful tips.
@@Brokencircuitboard No problem dude
Very calm and educative video, thanks!
you can combine all the tutorials into one Playlist
Done.
@@Brokencircuitboard Thank you very much 😊❤️
thank you, very useful. :)
glad to hear that. cheers.
I'm not super sure how this works, because the vertical raycast will always collide with the wall right after it fires from the first raycast's position...
True. But in this case, I make the raycast thicker so it will offset a little bit to touch the ledge. Or, you can just offset the Z position a bit forward.
thank youuuu!!
please make a tutorial on how to do a ledge grab!
Already did. Check my other video ☺
Thank you!
but how would this work if you are in an indoor environment?
why are there spongebob characters randomly LOL
creo que este es el inicio del tutorial de agarré de cornisas
it seems like it wont work properly if wall is not straight
For uneven surface, maybe you can use shapecast instead raycast for bigger coverage.
when i input the same code im getting a error on the line for hitpoint2 = raycast_ledge.get_collision_point()
Did you declare the hitpoint2 variable? try adding var in front of hitpoint2.
@Brokencircuitboard I did, that fixes the error, but the the actual function does not work
@@Snakesse4567 it could be because your raycast not hitting the edge of ledge. Either make your raycast thicker or edit the offset.
I think I found a gem
This is great, can you show how to connect to and climb a ledge as well?
Maybe at the next video. You can use either lerp or tween to move the player to ledge.
@@Brokencircuitboard thanks, I'll look into that in the mean time, see if I can figure it out.
@@bezoika4594
var tween = create_tween()
tween.tween_property(self, "position", platform.global_transform.origin, 1, ).set_trans(Tween.TRANS_LINEAR).set_ease(Tween.EASE_IN_OUT)
Tweens self position to a variable called platform in 1 second
@@Brokencircuitboard does it still snap the right way if it comes at a high angle? that's the part i'm having a hard time figuring out
@@atheneite what do you mean?
your offset Y is a static value of 0,3,0 so it only works for this specific height only?
No. That Y offset is for the origin of second raycast, not the ledgepoint. You can get any height you want from that second raycast hitpoint as long as it within that Y value offset.
@@Brokencircuitboard I don't understand how this second ray hits anything, it is on the *side* of a box, and it hits nothing because .. its on the side. Or is this raycast *inside* the box and it hits the upper most side of the box?
In the video you are visualizing it as if the ray is on the outside, that's why I'm confused.
1) 1st raycast hit the box forward. We got 1st hitpoint.
2) We offset Y value of 1st hitpoint. now, we got origin of 2nd raycast position. This is the confusing part.
3) Only then we create 2nd raycast. the position of the 2nd raycast is AT Y offset we make previously.
4) We point 2nd raycast downward, whatever that raycast hit, we got our ledge point.
and yes, 2nd raycast is outside of the player. I created empty node to hold the 1st raycast hitpoint.
@@Brokencircuitboard if you point the 2nd raycast downward, wouldn't that just hit the 1st point again? Why would it be stopped by the box? It is on the same x,z position as the 1st point, which is stopped by the box. Don't you need a small offset at x or z to account for that?
@@semaph0re Ah, i see what you mean. by right it shouldn't hit, but since you can set the raycast thickness in godot, it will barely hit. Or, just offset Z value. I don't bother doing that in this video, since it work for me 😅
this robot voice puts me to sleep make it faster
I know right? Set playback speed to 1.25x sound better.