Trouble setting I up new character

gecko64

New member
Hi, I purchased Third Person Controller and a couple add-ons today, but having troubles:

1) I have a biped character from the Asset Store, with an Animator Controller. (I don't have much experience with Mechanim but I understand the general idea.) I've tried a dozen times to set this up with TPC but keep getting the error: "Error: There is no look source attached to the character AdeliePenguinModelMiddlePoly. Ensure the character has a look source attached. For player characters the look source is the Camera Controller, and AI agents use the Local Look Source.
UnityEngine.Debug:LogError (object)". I understand that the Camera Setup step should prevent/fix this, but it isn't helping. I found this in the documentation: "If the error is occurring in a single player game the Camera Controller can be attached as a Look Source." -- but how do I do that? Attach what to where?

2) Once I solve that, I am then unclear on how to set up the states of the character. I want to use the Third Person Adventure setup, but I don't see how to fully do that, and I'm confused about States vs Abilities (so Movement is a state, with sub-parts for different types of movement...where are those setup and assigned), but Jump and Climb are Abilities (and where are those animations and inputs set up?) 've looked in the documentation for guidance, but what I can find simply shows how to assign existing actions/states from one object to another. How do I create a NEW character with it's own actions?

Maybe I am somehow missing the parts of the documentation that outline how to do this on a new character. I am very confident that this will be an awesome tool once I figure out it, but the learning curve is more daunting that I expected....

thanks!
Dave
 
You can manually specify a look source by adding the LocalLookSource component. You can then assign a transform to the "Look Transform" - using the transform of the camera is a good idea.

"Third Person Adventure" refers to both a View Type and a Movement Type, not a state. Basically:

- Abilities are actions of some kind - e.g. using an item, jumping - that can be tied to the animator via. animator parameters such as AbilityIndex (each ability can have a unique AbilityIndex value, which is used to control transitions in the animator to determine which animations to play)
- States are basically booleans; they can be "activated" in a number of ways (e.g. an ability can activate a state whilst it's currently active, an item can activate a state whilst it's held, etc.) and can be used to modify the properties of many different components by enabling presets - e.g. you can have a Jump ability, which activates a state called "Jump", then your UltimateCharacterLocomotion can listen for the "Jump" state and activate a preset which modifies its motor acceleration value
- View Types define how the camera moves, rotates, etc. in response to the player's input
- Movement Types define how the character moves in a similar way

Hope that helps, I'd recommend looking through the docs pages that I linked, especially the state system one - it's very powerful and flexible and is often used for a lot of different purposes, so understanding it will help a lot.
 
Thanks much for the help, but I'm still struggling.

First, I added the LocalLookSource component to the player-character, and assigned the camera to it, and that eliminated that error, whew. I did notice the mention of that script in the docs, but only in reference to AI characters, so I'm curious/confused why (a) I had the problem in the first place, and (b) if this is a proper solution....should the Setup step normally add this component and hook it up, and for some reason just failed for me?

So now I want to set up basic movement and camera controls but just don't get it:

1) Looks like basic movement is built into Third Person Adventure movement, and it works, but how/where do I assign walk, run, etc, animations to those movements? (At runtime, my character moves, but no animations play.)

2) I have the Jump ability added under Abilities on the character, but spacebar doesn't make it jump. According to the docs, it should just work...but it doesn't. I noticed that the Nolan character has Airborne Jump Preset, so I added that, but still no go. Jump in input manager is set to spacebar. No errors, so I'm stumped. (and then once I get that working, how do I assign the Jump animation? I see the AbilityIndex on the Jump section on the Ultimate Character Locomotion component (set to 1, default value), and on the Demo animation controller, I see the AbilityIndex parameter, but it's zero and I can't figure out how to show/set that parameter for each animation.)

Sorry to be so thick -- I know this tool has thousands of people using it, so PEBCAK -- if there are indeed docs explaining these things, please help me find them....

thanks!
Dave
 
Last edited:
1) Do you have much experience with Unity's Animator Controller (commonly referred to as Animator)? It can be quite complex, especially with something like a full 3D character controller, so if not then I'd recommend taking some time to learn how they work and how to use them in a simpler context (i.e. without all the UCC stuff to think about at the same time). UCC uses it to control all the character's animations, by setting various animator parameters during runtime (e.g. each Ability can have a unique AbilityIndex, and you can use that animator parameter to control various animator transitions). Another good way to learn would be to start with the UCC demo project and tweak things one at a time - e.g. once you have a basic understanding of how Animators work, you can start replacing individual animations within the UCC demo's Animator, start tweaking transitions, etc. The Animator section of the docs may also be of use: https://opsive.com/support/document...oller/animation/animator/animator-controller/

2) To debug this, you can first find where the source of the issue is: first, is the ability even getting activated? The Jump ability should say "(Active)" when you start it. If it's not, then the issue may still be with the input. If the ability gets activated but the jump doesn't occur, then you can check if the AbilityIndex parameter on the Animator actually gets set during runtime (you can either watch the Animator window in realtime, or use the Animator Monitor component to log parameter changes to the console). The issue might also be that the Jump ability is waiting for an animation event that is never being called (if you're not using the demo animator + animations, then you likely don't have the relevant event - "OnAnimatorJump" - assigned to your jump animation). So you could try disabling "Wait For Animation Event" on your Jump ability.

Hope this helps a bit - UCC, just like Unity, is certainly powerful but it is also quite complex, and 3D games are just complex in general. So "PEBCAK" may be a little bit harsh in this case!
 
Top