Be the first to post for 'The Animator Override Controller'!

If you’re reading this, there probably aren’t very many posts yet. But don’t worry, you can be the first! Either create a new post or just reply to this one to say ‘hi’.

Ben mentioned in the lecture NOT to populate the Player Override Controller with over ride animations. I am using Unity v5.5 and when I added the Player Override Controller everything was filled out like in the picture below

While not running the game, I can select the Player, Chose Animations, click the drop down and see DEFAULT_ATTACK. During run the animation does change here to the correct animation attached to my weapon. But after turning off the game, in the Player Override Controller, DEFAULT_ATTACK does not come back like in Bens video.

I have tried recreating the Player Override Controller several times and am still exp the same issue. This is getting pretty frustrating…

I’m still working with ThidPersonCharacter and ThidPersonUserController, and a custom Camera but I would like to add some code for the Player attack. As you can Immagine, my Camera is totally different, but CursorAffordance and CameraRayaster could work with a thirdparty Camera, but not for me 'cause I get:

“NullReferenceException: Object reference not set to an instance of an object
RPG.CameraUI.CameraRaycaster.Update () (at Assets/_Camera & UI/CameraRaycaster.cs:51)”

which is:

	if (Input.GetMouseButton (0))
	{
		notifyMouseClickObservers (priorityHit.Value, layerHit);
	}

I would like to add some code on Player class to better intercept the mouseClick to play attack animation, and lower enemies health points, but I would be happier if Ben told us some Official Modification so I could better follow the course without having my class to much different from yours.

… Professor BEN? :slight_smile:

There seems to be a subtle change between Unity versions with regards to the override controller, and whether values are filled-out by default or not.

With regards to the NullReerenceException, this is most likely to be the priorityHit value, have you tried printing it in the line before?

I was surprised to find that the run time animation change persists after the game stops running. Here is what you see inspecting the Override Controller file before and after running the game.

Not a problem, but surprising to me.

If we add the shooter condition to the left of shooter && layer is different, will this make a projectile fired before the shooters death become harmless?
i not sure how to do it, but shouldn’t the projectile still hit the player?

Privacy & Terms