UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

editor

AI Player Animation & Shooting Issues

Under Audit

AIanimationgamepad

Unity 2021.3.x - Unity 2023.2.x

Published 9 days ago

AI players in the AlterunaFPS template may experience issues with animation blendtree functionality and weapon shooting capabilities, requiring investigation into animation setup and script interactions.

Issue

 AI players implemented within the AlterunaFPS template for testing in an Offline scene exhibit two primary issues. Firstly, the animation blendtree, which was duplicated from the original character setup, improperly cycles through all three animations. This suggests a misconfiguration or scripting conflict within the blendtree itself. Secondly, these AI players are unable to fire their assigned weapons. This indicates a potential issue with the weapon activation logic, input processing, or interaction components attached to the AI players.

Experimental Fixes
  • Inspect the Animator Controller for the blendtree transitions and parameter conditions, ensuring they are correctly configured for AI behavior.
  • Review the AI player’s weapon firing script, verifying that input triggers and weapon activation logic are properly implemented and connected.
  • Confirm that the weapon’s Raycast or collision detection system is active and interacting correctly with target layers.

Editor's Note:

The above fixes have not been verified by our audit team yet. They are provided exclusively for your own technical research. We recommend creating a backup of your project before proceeding with any attempts. Utilize at your own discretion!

Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.