i am working on a ledge climb system and I am currently refactoring it to make it more reliable.

I am tracing with a sphere towards infront of my character. If it found something, I trace downwards. However, with steeper angles, this produces non-reliable results.

I searched the Web a lot and it looks like that a Plane Intersection algorithm seems the best method, however I am not sure how to implement this.

My idea was to first trace towards the wall again and define a plane out of the point and the hitnormal. Then I trace downwards again and do the same. I then use the cross-product of both normals to retrieve the direction of the Plane Intersection.

And now I am lost on how to go further. I am not sure how to implement the actual plane intersection in Blueprints.

I want to avoid using traces alone because I want to have small cracks that need to be grabbed without any additional collision hints etc.

Does someone have a clue for me how to implement this? (Not a genius in maths, some tips would be nice though)

  • \$\begingroup\$ Unless you need free-climbing, is there a reason you aren't using Actors and Volumes to define ledges? \$\endgroup\$ – JonS Dec 8 '17 at 12:33
  • \$\begingroup\$ @JonS Because the meshes are already simplistic. Assigning Meshes and Volumes for these kind of meshes doesn't make sense to me \$\endgroup\$ – Raildex Dec 8 '17 at 15:34
  • \$\begingroup\$ Still, making specific ledge/grip volumes does make the task easier. Programmatic ledge detection is hard and can be wuite difficult eith even moderate meshes. \$\endgroup\$ – JonS Dec 11 '17 at 2:21
  • \$\begingroup\$ why do you need to use blueprints? \$\endgroup\$ – hythis Dec 11 '17 at 19:49
  • \$\begingroup\$ what is wrong with this method? gamedev.stackexchange.com/questions/40302/… \$\endgroup\$ – hythis Dec 11 '17 at 19:53

For ledges, I would trace both horizontal and vertical rays.

Something like shown in this movie by Tim Dawson: still from ledge test movie

  • 1
    \$\begingroup\$ I already do this, but with shapes different than cubes, it results in non-desired results. rotate a cube 45 degrees in pitch and it won't find the ledge anymore) \$\endgroup\$ – Raildex Dec 10 '17 at 1:01
  • \$\begingroup\$ If you radially fan out the forward segments, you can approach the wall from an angle. If the wall itself is at 45% angle, it would be more of a hill than a wall w ledge, would it not? \$\endgroup\$ – Bram Dec 10 '17 at 1:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.