I've attempted to create an NPC with the Ethan Unity Third Person prefab (attached is paths, unity third person integrations script, NPC, and Nav Mesh agent), but I think something isn't working quite right. For one, the character will properly avoid the player by moving out of the way, but it won't do any walk cycle. It just slides away. Secondly, the character hovers above the ground and can be tipped over by the player once avoid player is disabled.
Generally, all I need the character to do it to move idly around in a certain area and be talked to. Are there any specific settings that need to be set for this to work?
Comments
Let's see your Inspectors for the NavMesh Agent, Third Person Character, NPC and Unity Third Person Integration components.
Is the character moving out of the way or just being pushed? Does the AC "blue line" gizmo appear if Gizmos are enabled in the Game window? I'm not clear if the avoidance is due to AC or the NavMesh Agent.
A custom Action that allows for NPC "wandering" can be found here:
http://adventure-creator.wikia.com/wiki/Moving_characters_randomly
I've updated the wiki script to fix NPCs moving under direct control. Since your NPC has "Keep out of player's way?", I'm not sure how they would have been moving if it wasn't to do with that bug. Also, your Third Person Character component is disabled - does re-enabling it and updating the script improve things?
Not sure if this is related, but it seems the integration script causes two constant errors of "parameter type jump does not match" and "parameter speed does not exist." How do I get rid of these?
The Console errors would be due to the "Speed" and "Jump" parameter names being listed in your NPC component's "Mecanim parameters" panel.
These are used to tell AC which parameters it can control at runtime (see the Manual's "Character animation (Mecanim)" chapter). Since the Third Person Character script also handles animation duties, those fields should be cleared in the NPC Inspector.
Since those parameters don't exist in your Animator, however, they likely won't make a difference to the main issue at hand.
When you say he's perpetually falling, do you mean that he's literally falling in the negative Y-axis, or he's on the ground and playing a falling animation?
If the former, then it may be an AC issue since AC still currently controls a Rigidbody's Use Gravity option even if Motion control is set to Manual. In this case, does checking AC's Ignore gravity? make a difference?
If the latter, then it's likely down to an issue with the Unity script. Open up the Animator window at runtime to see what parameter values are incorrect - as that's likely the cause. I found that this behaviour was prone to occur when testing Unity's Third Person Character script on its own.
I will examine the project, but in future please wait for instructions before sending me large files. In most cases, only a selection of files are necessary.
Increase the component's "Ground Check Distance" to 0.3 (to match the player's) and it should work.
The random movement Action would need to be looped back on itself (with an Engine: Wait in between) for the NPC to appear "wandering". How have you used it exactly, and are you getting anything relevant in the Console?
To install it, place it in a new subfolder somewhere in your Assets directory, then point to that directory at the top of the Actions Manager. Once installed, you should then find it listed under the "Characters" category of Actions.