I'm currently trying to make a real-time RPG with a Diablo/Torchlight-like style of combat. I've set up a combatant spawner that spawns 10 of an enemy combatant prefab. The enemy is a monster that looks like a wolf currently. I've added a damage zone to my player and put a damage dealer on the enemy's head.
Despite whatever ranges I've set up, when the enemy moves in to attack my player, it does so and then moves right into the player's collider and starts circling around the player. Because of this, the next time the enemy attacks, it's head goes right through the player and doesn't damage them at all.
Another issue is that the enemy's animation for movement isn't playing. I have set the correct animation setting on them and I have turned on the Auto Move option under Animation for the combatant, but they just stay in their idle animation while moving. I am using the legacy animation system.
Also, do you have colliders on them (not used as triggers) that prevent the combatants from running into something?
The movement animations not playing could have multiple reasons, e.g.:
- wrong animation layer setup (e.g. idle animation is on a higher layer than the moving ones)
- misspelled animation names (case-sensitive)
- correct animations selected in the combatant's settings
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I had used the same animation settings as the game tutorial did, with idle at -1, walk and run are at 0. The animations are named correctly, they are lowercase on the enemy and lowercase in the ORK Framework window. The same animation names are on the player and the player's animations are working fine. I only have one set of animations currently, and it is set on both the player and the enemy.
When not using a character controller, your enemy will be moved using it's transform, which doesn't use any sort of colliding ...
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I'm still stumped about the lack of animations on the enemies. Shouldn't the move AI be taking this into account as well?
If ORK should handle your animations (i.e. you're not using a custom animation controller), you need to enable the Auto Move Animation in the combatant's settings.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Also, adding the Character Controller seemed to fix the other issue I had.