• News

• Industries

• Learning & Support

• Community

• Marketplace

# Any pathfinding and character solution for spherical levels (like Asteroid)?

I’m currently have some thoughts about my new game concept and one of my main ideas is to implement a tiny planet like physic for game.
I already just did simple C++ proof of concept by disabling gravity and using PhysicThruster components in each the actors
to simulate gravity for specific planet sphere geometry.

Here is video demonstration:

But after I start thinking about next steps, few new questions has been appear:

1. how to implement path finding solution for pawns?
2. is it any troubles with default humanoid character physics in UE4 in situation without default gravity force (like that might be characters won’t able to change orientations according to custom force gravity point).

I just tried to build NavMesh for sphere and half of sphere geometry and found that NavMesh which was generated as result
mostly is very close to 2D plane (even if is have some convexity), therefore it’s looks like NavMesh is not so good for my idea (or for cases where pawns able to walk on walls directly like spiders) - is it true?
(In other words - Have I need to implement my own path finding solution?)

Currently I didn’t tried do something like it in UE4 and I don’t have enough knowledge about UE4 character system.
Therefore what do you think about it? is any limitation to use characters system without default gravity?

Thanks.

Hi,

1. We don’t have any plans to add functionality to allow navigation on arbitrary geometries at the moment. Any pathfinding solution is going to need to be built from scratch.

2. We do have plans to allow characters to vary their gravity/‘up’ vector! This is definitely on our road map and we would like to get to it in the next few months.

Hi, thanks for clear answer, I think that I know that I have to do next.

My guess is that you’d need to roll your own 3D NavMesh system which would entail grabbing all the triangles from the sphere and plug that into an A* algorithm. Your spheres appear to be perfect planetoids which means you can orient your UP vector fairly easily by taking the center of the sphere (Character Position - SphereCenter = Up Vector). You could have also used the normal of the plane the character is standing on in which you could have gotten via a raytrace

Aww boo. I’m trying to build a Gradius-like game and having 2D Navmeshes for AI would be a really nice thing to have.

Well, purely 2D should definitely be possible with what we have now. As long as the geometry that the navmesh uses is built along the standard ground plane (i.e. z-up) you should be fine. Of course, how useful this is depends on what else you are planning on doing with your game.
It’s just where people are wanting to build levels where entities can walk on walls/ceilings etc. that cant be done with the current system at present.

Greetings Tom and thank you for the reply.

I was trying to use the NavMesh with Y up so flying enemies could dodge asteroids easily while enemies on the ground would use a Z up navmesh to move along the ground. I’ll probably just put triggers around the asteroids that signal the enemies to slow down or move in the opposite direction the asteroids are falling while touched or some other hack for now.

Ground enemies weren’t having problems until I tried to get them to jump on floating platforms. I placed NavLinkProxy actors but they wouldn’t jump. I looked at the BSP and there is a little green strip in the middle and the NavLinkProxy widgets are touching the green. I thought this should work.