Download

TopDown template - character fall

Hello. When im on stairs or other kind of 'higher ground" and i click on the floor my character walks down the stairs around and gets to the point, but i would like it to fall down because its much shorter way. I cant also get on that cube on the screen. How do i modify the charcter to do what i want?

Thats the screenshot http://i.imgur.com/xHv97ws.png
Right now i click the point at the floor and instead my char walks the red way ( blue is the thing i want)
I also cant get on the cube with green line

Greetz

Hi Pancakez,

The reason your character won’t walk off is because the Top Down game’s movement is based off a nav mesh. If you click in the viewport and hit the ‘P’ key, it’ll show the nav mesh itself. All of the movement that the character makes is limited to the green areas of the nav mesh, which are normally flat surfaces that are within the NavMeshBoundsVolume which can be found in the world outliner.

The answer to making the character jump down comes in the form of a nav link. This can be added like most other objects and will give you a left and right node for the link. Nav links, by default, only work in the downward direction and require special functions to allow a character to go upward. Simply place the left or right node at the top of the ramp, then the other on the ground in the direction you’d like the character to jump off. The limitation of this is that they will only jump off from that spot. Also be sure that the settings of the nav link match the direction you’re making them go. In example, if the left node is at the top of the ramp and the right is at the bottom, set it to left to right. If you set it to both ways, the character will attempt to go up that way as well even though he cannot.

When it comes to the character not wanting to walk on top of the cube, that is due to the nav mesh’s bounds. If you scale the nav mesh to encompass the cubes as well as the floor, it should generate a nav mesh for the top of the cubes as well, allowing the character to walk on them.

Hope this helps!

Thank you, i will have look into it.
By the way is it good idea to write game server from zero (separate project, not using anything from UE) ? Im goin to have small map with pickups some basic powerups nothing too complex. But i worry about pathing

I apologize, I don’t understand what you mean by ‘write game server from zero’. Could you please elaborate on what you mean?

What i meant was i want to create server side using winsock and also implement all the connection, packets sending and receiving in client. I want to use UE only to create game client (i want this game to be some basic MMO), but i would write server myself not using actor replication and other stuff from UE. Just normal c++ server project from scratch.

Ah I see. I personally don’t know much about networking or server programming myself so I’ll have to pass this question on to the community. Hopefully someone else has the answer.

The navlinks are not really what i was looking for. Imagine a very big floating floor over another floor. I want my pawn to fall on the lower floor (takin shortest path possible) when i click on it but i would have to set tons of navlink proxies? There is old game caled Lineage 2 (also uses UE) where the movement works exactly as i would like it to, you can click on lower ground being anywhere and it will take the shortest path to fall down

The reason that Lineage 2 worked that way was because they had set up their own movement and pathfinding. Nav meshes were not available in Unreal Engine 2.5 which is what was used for that game. If you do wish to mimic the way Lineage 2 does its pathing, you would need to program a pathfinding method of your own. If you wish to go for the easier route and use the editor’s tools that are available, nav links are the best solution that we can offer.

Well that explains a lot. How can i start creating my own pathfinding? Right now i have no idea how that thing works like

This is once again not in my area of expertise but I would like to refer you to this forum post:

It’s all done through blueprints instead of C++ but it can give you a general idea of what you’re trying to accomplish. He has a download link available so that you can test it out yourself and see exactly how it works.