Download

2D Sprites in a 3D world + AI

I’m working on a 3D with the actors being 2D sprites. Setting up the player controller was simple enough but now that I’m working on the AI and it’s giving me some trouble. The AI wants to rotate toward the player, which isn’t good when using a 2D flipbook. I’ve tried to lock all rotations under the capsule component (the only place it seems to give me the option) but still spins around to face the player. I was trying a simple [Move To] node in a behavior tree so no options for stopping rotations there. Is this something I’m just going to have to code myself or is there some settings that I’m missing? I would like to take advantage of the navigation mesh and what not.

Any help would be greatly appreciated.

You could try setting the rotation of the sprite component instead of inheriting the capsule’s rotation.