Recently I added some models to the testing AI so they'd look nicer in demo videos and I'd have something more to work with than just the basic capsule. I found a pack on the Unity store that I liked and started adding some of the models to the project. Other than them lacking an animator, they were pretty straight forward, labeled out well, and looked nice. So then I needed to add weaponry to the AI and so I just made a new part to the model I was using so I could rotate both arms at one to make them face forward with the weaponry. I then got to the point where I wanted the AI to aim with their arms on their own. So I figured I'd be able to just rotate the arms to look at their target, but instead they aimed every where EXCEPT the target.
I was so confused on, why they weren't properly aiming their arms at the target. I had the right transforms, it wasn't using the wrong rotator, and everything seemed fine, except they still weren't aiming at the player. Then I learned that instead of seeing the global transforms in the Unity editor, you can set it to only see the local, and there was my problem. The forwards on the model were all backwards, meaning I had to make new transforms that faced the right way. From there I didn't have a problem since, and I now know better to check the local transforms of my models.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.