How to make only obstacles slip through like a ghost?

I am making a horror game and would like to create an actor that can only
slip through walls and other obstacles, not through the floor, like a ghost.

However, when I change WordlStatic and WorldDynamic to “OverLap” in the trace channel of the ghost actor’s collision, the floor also slips through.
This is not the desired result for me.

So, I changed “Pawn” to “OverLap” in the obstacle collision tracing
but then the Player and other actors could also slip through the obstacle.
This means that all pawns are dead.

How can I make it so that only certain actors (ghosts) can pass through obstacles?

Project Settings → Collision

Create a new Object Channel named Ghost.
Default Ignore.

For each actor you want to block the ghost you set custom collision and tick block for ghost.

Thank you for your response.

I am now able to let only ghosts through this way. Thank you very much.

However, there is another big problem.

The ghosts appear as enemies chasing the player, but they recognize the objects they can slip through as obstacles and do not try to pass through the area.

Also, if the ghost is placed inside an object from the start of the game (and allowed to slip through), there will be a place between the obstacle object and the outside of the obstacle object where the NavMeshBoundsVolume is not reflected,I am unable to get out of the interior of the object.

I know this question is unrelated to this thread, but if you could answer it, I would appreciate it.

Sorry. Problem solved.

Set collision on the object to block both ghosts and players, and make the object block only the player.

After that, when the ghost enters a state where it is chasing the player, disable collision, and enable collision after it loses sight of the player.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.