Jump to content

Solved - NavMesh Problem


Joe
 Share

Recommended Posts

I have a script which adds blocks to order to make a level, but it won't supply a working Navmesh. I have reworked it to the script on the website, but DebugNavigatioMode shows no blue area.

 

This is the script for each box

 

width = 2.56
height = 1.28
depth = 2,56

local sc = Vec3(width,height,depth)
local m = Model:Box()
local s = Shape:Box()
m:SetShape(s)
s:Release()
m:SetScale(sc)

m:SetNavigationMode(true)

 

Shouldn't this, when using world:BuildNavmesh, be enough to create a navmesh in game? Each side is only 2.56 long so it is not the edge length. Characters also have navigation mode enabled but there is no blue area even.

 

Edit - It works on a test box, nut not on the script I have written that creates multiple boxes and then builds the navmesh. I will keep working on it but if anyone has any tip on building navmeshes from script it would be much appreciated

 

 

Solved - the objects parents were not set to navigation mode, so the hierarchy was upset

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...