Advertisement

Procedural wall angle detection & intersection point

Started by May 05, 2016 12:12 AM
0 comments, last by Mussi 8 years, 4 months ago

Developing a simple wallrun/parkour game
what i need is rather ...deceptively simple. Its based on several old game titles.

I uses, Unity, Unreal, and could find nothing alike.

I hope i am describing this correctly:
1. character is in a set world position, near it is several meshes/ collider units, not convex definitely
2. upon a set distance radius of it, not colliding directly, the character acquires the meshes' angle, and anything that is not 'ground'
about 120 degree or less than 90 degree, (very steep wall or ledge, or a sharp valley) is considered "climbable".
3.from there, character either shoots ray, or a sweeptest to it, to acquire the hit and normal of that plane:
so if the plane is a short , descending ledge, like... stairs railing made of flat polygon, it will acquire hit point somewhere on the top most of that stairs handle, if the plane is large, than the max is clamped on the character height.
4. then, sort out the smallest distance, and the nearest is the point where character can jump to and climb.

I understand this topic is less of the climbing but more of the edge acquisition,

but this is the core foundation and its been driving me nuts.
I tried things like BSPtree, but everytime i bruteforce it in unity, it gets so heavy during runtime.
I'm making something like PPSPP quality so it has to be lightweight, and using a psp game as comparison, this game must not run heavier than it

with the same asset quality.

Thoughts?

I'm browsing through several engines too other than Unity and Unreal, openframeworks and polycode maybe...
so this solution better be universal of sorts....

I'll put some visual examples next time.

I'm not sure I understand what you're trying to do, but if you can brute force it you already have a sort of solution it seems? Have you tried splitting meshes up into ground and not ground before hand so that you don't have to do that at runtime? You could also use a quadtree or an octree to only test against meshes that are nearby instead of all of them (a simple bounding sphere range check might also do it). Another solution might be to use meshes that are approximations of the meshes being displayed, less triangles to sift through.

This topic is closed to new replies.

Advertisement