AI Chars getting pushed.

RobotGames

Member
My char controller can push the AI UCC around. Like literally as I move forward they are pushed backwards to the point it will push them through a wall. I want my AI chars to be a wall, a rock, not to be moved by the player running into them.
 
Can you tell me how to reproduce this within the demo scene? I just tried to push Agent Nolan but that agent stayed still.
 
Figured it out, Enemy layer was not set as a Solid Object Layer. I went side by side with the demo and checked everything for differences. Which begs the question in the Layer manager what does Enemy Layers do? I mean should the Enemy AI have Char as an enemy layer?

If I have character and subcharacter selected in solid object layer on the AI it can be pushed around by the player. This is getting confusing. What I am trying to achieve is a solid collider around the player so the api cannot get so close I see inside the mesh. The AI should be stopped a meter or so away from the player and be a solid stop. As well the player should not be able to push up beyond this barrier.
 
Last edited:
I am using the first person shooter scene demo. Here is Nolan:
1440

1441

The large collider is set to SubCharacter Layer. Agent Nolan has character and subcharacter layers set as solid. He gets pushed around. If I set Solid Object Layer to SubChar on Agent Nolan without Character being solid, he gets pushed around.
 
You could create a new layer and have that layer be a solid object layer. Make sure when the AI fires they are not able to hit your new layer. An alternative method may be to also use the Nav Mesh Obstacle to keep your agent at a distance.
 
You could create a new layer and have that layer be a solid object layer. Make sure when the AI fires they are not able to hit your new layer. An alternative method may be to also use the Nav Mesh Obstacle to keep your agent at a distance.

Nope.
I have tried many iterations of this, basically the UCC sees itself as inside the collider even when the layer is set to invisible. You should give it a try, it's entertaining. The char just starts jumping. NavMeshObstacle is way to slow and still allows the player to run up and into the AI. What we need is a mechanism like Skyrim, fallout or such where I can only get so close to another player or AI. I did notice in the Bethesda games I can still push an AI char but only very slowly and they usually slide off the sphere as opposed to being pushed through a wall. That is the real issue, I do not mind the push as much as they can be pushed through walls and barriers.

If I reverse it, such as put the barrier collider on the AI, they push the player.
 
Last edited:
Top