Jump to content

NO BUG: NPC seem to see thru static meshes. Ok with only brushes.


 Share

Recommended Posts

Hi,

 

I'm using the beta version on steam, using it on Window 10 Home (French) currently.

My graphic card is a NVidia GTX 780

 

I've buyed yesterday the MERC model and tryied it in a quick level made with brushes. I really like it and it's so simple to use it! But I've seen some issues on how leadwerks seem to make NPC "see" in their environment.

 

On the level made of brushes, I had to enter the room where the merc was to see me and then he started to chase.

 

I've exported the map in .OBJ (Great feature!) and imported it in MAX then done a quick bake of lighting and imported it back, mostly to test if the scale/position was not changed in the export/import.

 

Everything worked, I was able to make the collision shape from the tools provided in Leadwerks. Collision is working perfectly, and the map work as before except this:

 

If the brushes are hidden or removed, the NPC will see me immediately and start chasing me (using the NAVMESH to get to me even if I'm behind a door / wall). For Leadwerks the level that has that problem has no brushes and only is composed of static meshes.

 

So if I want to fix this temporary, I will have to create brushes and hide them inside the model, so the NPC`s will not be able to look thru the wall. Doing this will surely decrease the performance.

Link to comment
Share on other sites

If you look at this chart you'll see why (my guess). Prop and character collides (which is why you can still walk around), but LineOfSight and Prop do not cause a collision. The enemy NPC is probably doing a pick from it's position to yours with the LineOfSight collision type on it's ray, which doesn't collide with Prop types so it saw right through your model and to you.

 

http://www.leadwerks.com/werkspace/page/api-reference/_/command-reference/collision-r778

Link to comment
Share on other sites

Yeah, basically it is assumed that "prop" means smaller movable items, so we don't want the player to be able to sneak up on AI by picking up a crate or something.

My job is to make tools you love, with the features you want, and performance you can't live without.

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...