user3690398
user3690398

Reputation: 25

Enemy's parts are visible through the walls in Unity 3D

I have a location consisting of several connected rooms and some enemies chasing me. But when bots are walking very close to walls I can see their hands passing through the walls, despite both bots and walls have colliders and enemies cannot go through them. Is there any way I can create a border or something to prevent it?

Upvotes: 1

Views: 220

Answers (1)

Gavin42
Gavin42

Reputation: 490

It sounds like @Heisenbug is probably correct.

I would attach a secondary collider to your model, most likely a box (for speedy processing) and call it personal_space. This way you can control how much space they give themselves from walls and such while still allowing them to get closer to the player and other special objects.

Upvotes: 1

Related Questions