Jump to content

Monster walks through closed doors


xtom
 Share

Recommended Posts

I have a problem with monster walking through closed doors. The collision stops it sometimes but then sometimes he just passes right through. I thought maybe the MonsterAI speed was too high so I reduced it from 6 down to 0.7 for a slow walk speed and still he can pass through the door. The door and frame are models and the walls/floor are csg. I thought maybe the collision shape on the door was too thin but it's about the thickness of the 16 csg wall so I'm not sure why it's happening.

 

post-13640-0-65023000-1425401679_thumb.png

Check out my games: One More Day / Halloween Pumpkin Run

Link to comment
Share on other sites

I think using navmesh navigation, the character controller just navigate trhough navmesh and don't pay attention to obstacles.

 

You must use a raycast , so your monster will be able to detect some obstacle and then stops walking or choosr another destination.

Stop toying and make games

Link to comment
Share on other sites

The strange thing is before I had buildings and walls with navmesh running right through them and the monster couldn't pass through the walls even though the navmesh passed through. It just kept walking into them which is what I was hoping for with the doors. I'm not sure why it's behaving different. I'll do some experimenting and see if I can make him make him hang around the door instead of walking through it.

Check out my games: One More Day / Halloween Pumpkin Run

Link to comment
Share on other sites

I assume your walls don't have joints on them but your doors do? The joints create a means for the physics of the controller to push open the door. Personally I wouldn't use physics on doors. I would just rotate them via code when they need to be opened or closed.

Link to comment
Share on other sites

I had this problem more than once and never solved it. My door had no joints. My character could not get thru center of door but could slip through the edge even though the door was slightly bigger than the door frame. I relied on physics and sometimes it worked, sometimes not.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

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