Forum rules - please read before posting.

Navigation Mesh Creator from mask and height map/depth map

Okay, this is created by a lot of help from Opus, GPT, Gemini and myself with a lot of experimenting to achieve what I want.
The idea is to take an image and a "walking" mask, https://imgur.com/a/brFvR2P , and an optional height map (if there are some stairs for example) and generate a navigation mesh that the player can navigate on it in a 2.5D game.

https://pastebin.com/rRbXn9fm

Features:

  • Can work in a hotspot and a navigation mesh
  • Can use mesh source = points instead of mask if you define points
  • Optional height map to create navigation mesh above the standard "floor" which is by default at -2.72 Y.
  • Optional depth map
  • Optional helper to til the camera based on horizon line (very important for rooms that have much tilt in the bg)
  • Downsampling/Simplification if the mesh is too slow for the pathfinder to work
  • Optional left/right/bottom/top extensions or mesh multiplier
  • Gizmo showing modes
  • Bake to asset so the script is not needed at runtime

Put it as a component to a "Collision Cube".

Thanks to this I was able to create the "floor" for all of my games.

Comments

  • For easy mode, put in the collision cube, select the mask texture and press bake to asset and your mesh is there.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.