Animation Script Addition


July 6, 2024

Entry: 16.0

I wanted our newly created M4A1 animations in animation script. I made a mistake last time, and I wanted to fix it. So I did, and I ran the game. The animation didn't happen, so I checked the animator, and I realized what had happened. I was missing a condition and a connection. Then, it worked, ish. The animation was running, but the M4A1 was nowhere to be found. But it's shadow gave away a clue. It was parented wrong, and in the script that moves the hands and stuff with the camera, it was 50 ft in the air. But after some testing, I found out this wasn't the problem. The problem was the idle animation only had 1 keyframe, meaning it was all messed up. So I added another keyframe, and it did nothing. I made an adjustment to the animator. And after one more playtest, I figured out the real problem. 

It was pivoting so far around the main camera, that it messed up the animation. No matter what I tried failed. I took it out of the script that parented it to the camera. But then it didn't rotate with the camera. So I opted to put the camera rotate script on it, and that did nothing. So it was time for a little help from  my best friend: ChatGPT-4o. On the first prompt, it rotated horizontally only. Later, I think I got it. It wasn't smooth, and I needed to perfectly place a game object for a pivot, but I'll get it soon. Have a nice day everyone!

Please check out my profile.

Leave a comment

Log in with itch.io to leave a comment.