how to make the enemy penetrates wall?

i am at making enemy ghost, how to make enemy penetrates wall ? but no penetrates terrain … ?

I plan to make the enemy, and the enemy was following me through penetrates the wall around it …

I just need, how make enemy penetrate through the wall and not penetrate terrain?

Simply move them with the transform. Keep the collider if you need to kill the ghost. If he is just for decoration, you can even remove the collider and only have a mesh and texture flying around.

But the answer is use transform.Translate and you are sure to go through other objects.

(Funny as the question usually comes up the other way around)

If you want to keep the convenience of the character controller’s Move functions, you can set up your physics layers so that your critter is on a layer which doesn’t collide with walls, but does collide with terrain.

Physics settings are in Edit > Project Settings > Physics.