- Home /
How to do legdegrabbing
Hey there,
I want to make ledgegrabbing for my 3D Platformer but I cannot figure how to.
I have tried with RayCast to grab the ledge if the upper ray hits nothing and the ray below hits a wall. But it is very buggy and the height of the player, when he is hanging, isn't always the same(because of the difference of the ray position). I don't know what to do next.
Hopefully you can understand.
PS: What I could do is to rotate toward the wall with the help of normals.
https://www.youtube.com/watch?v=y4dLaZ5e$$anonymous$$44&list=PL47vwJBRNh1xzEvcLvXoJvjLcr1h0j-1O
There are all sorts of tutorials and bits of information online sorry I cant be more specific I have never implemented one but theres a ton of people out there posting about it.
I could implement a system, which I have done but I think its a big mess and to be honest, I don't know, what I exactly did... Yeah, before I wrote this question, I where on youtube and google too, but I couldn't understand, what they where talking about. But thanks.
Answer by Meishin · Aug 17, 2019 at 07:34 AM
A solution could be to add a trigger collider where you want the player to be able to grab and when the collider is triggered ;
1 - Nullify player movement
2 - find the nearest object point and use some hands IK (or animations) to make it look like it's hanging from the ledge
I'd use your solution more for providing the ability to climb walls / whatever.
I tried this method with collider but I didn‘t want to put on every ledge a collider and so I did it like I said in my other question which I posted. So for me this post is, sort of, solved. But thanks.
Your answer
Follow this Question
Related Questions
Pointcast? - Raycast Point X from same Point X 0 Answers
Align plane to normal but keep Y-axis intact 1 Answer
RaycastHit.normal - what does it really return? 4 Answers
Rotating an object to equal normals of object below 1 Answer
How do I obtain the surface normal for a point on a collider (can't use RaycastHit.normal)? 3 Answers