Hi,
I've been having issues with setting the Enemy layers on an AI agent.
In attempt to avoid changing the layer of existing Character collider I attempted using a second collider within 'Colliders' object inside my character, and set it to layer 'TeamLayer Players'. This causes a bunch of issues I won't list, even despite trying to play around with Physics collision layer matrix.
So I seem to be able to solve it by simply setting the Layer of the 'CapsuleCollider' of my player character to 'TeamLayer Players' after running the game.
Problem is if I set it to this layer before running the game my Character falls through the floor.....(doing it after works fine)
Reason for not wanting to use 'Character' layer as Enemy in my AI Agent's Layer manager is that all characters by default seem to have their Capsule Collider set
to 'Character' so I don't want my AI shooting each other or any character that isn't their enemy....
If there's a better way i should be doing this I'd be happy to hear suggestions.
- My game is not deathmatch, just utilising the AI behaviours for 'teams of AI', though I will be using formations, tactics, backup, cover
- PvE only, though I need to be able to have friendly AI also, and multiple teams
I've been having issues with setting the Enemy layers on an AI agent.
In attempt to avoid changing the layer of existing Character collider I attempted using a second collider within 'Colliders' object inside my character, and set it to layer 'TeamLayer Players'. This causes a bunch of issues I won't list, even despite trying to play around with Physics collision layer matrix.
So I seem to be able to solve it by simply setting the Layer of the 'CapsuleCollider' of my player character to 'TeamLayer Players' after running the game.
Problem is if I set it to this layer before running the game my Character falls through the floor.....(doing it after works fine)
Reason for not wanting to use 'Character' layer as Enemy in my AI Agent's Layer manager is that all characters by default seem to have their Capsule Collider set
to 'Character' so I don't want my AI shooting each other or any character that isn't their enemy....
If there's a better way i should be doing this I'd be happy to hear suggestions.
- My game is not deathmatch, just utilising the AI behaviours for 'teams of AI', though I will be using formations, tactics, backup, cover
- PvE only, though I need to be able to have friendly AI also, and multiple teams