|
Post by coffeeANDsoda on May 2, 2018 1:33:55 GMT
Awhile back I bought coregamekit looking for a solution to deal with AI and pool management. I am currently using a project with Playmaker 1.8.8 with unity 5.3.3. I set up a basic player capsule and a cube thats basically enemy  . What I don't understand is setting up a killable script properly in order for the player to do damage by walking up to it. Plus when I use the play button for unity to go into runtime, I get errors like the following. "GetRemainingDistance" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.NavMeshAgent:get_remainingDistance() UnityStandardAssets.Characters.ThirdPerson.AICharacterControl:Update() (at Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/AICharacterControl.cs:31) "SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.NavMeshAgent:SetDestination(Vector3) UnityStandardAssets.Characters.ThirdPerson.AICharacterControl:Update() (at Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/AICharacterControl.cs:29) I don't understand why its doing this. Hope that's enough info for some experienced users to analyze the problem I'm having. Thanks.
|
|
|
Post by DarkTonic Dev on May 2, 2018 4:34:42 GMT
Well those have nothing to do with Core GameKit, and I don't use NavMeshAgent so I won't be able to help unfortunately with those errors.
You should probably ask the author of 3rd person controller how to make it work with a pooling plugin, or if he has fixed this bug since the version you have.
Now to damage a Killable you just need to be able to hit its collider with your collider (or trigger), so make sure that the Physics layer to layer matrix is set up correctly so that those layers do cause collision. If it does, turn on the Log feature for the enemy Killable and see what it says when you try to damage it with the player.
|
|
|
Post by coffeeANDsoda on May 2, 2018 4:40:35 GMT
Well those have nothing to do with Core GameKit, and I don't use NavMeshAgent so I won't be able to help unfortunately with those errors. You should probably ask the author of 3rd person controller how to make it work with a pooling plugin, or if he has fixed this bug since the version you have. Now to damage a Killable you just need to be able to hit its collider with your collider (or trigger), so make sure that the Physics layer to layer matrix is set up correctly so that those layers do cause collision. If it does, turn on the Log feature for the enemy Killable and see what it says when you try to damage it with the player. It's I believe unitys default third person controller script that I added to a playmaker FSM on the player. Just to be clear if I were to use a trigger, cant I just use tags as oppose to setting up multiple layers? So the player has a tag and enemies have them as oppose to layers?
|
|
|
Post by DarkTonic Dev on May 2, 2018 5:10:38 GMT
Ok well I can't assist with NavMesh stuff because I don't use it. We use the "A+ Pathfinding" plugin on the Asset Store instead.
You can use tags or layers or both. We usually use layers because it's a one-time set up. All enemies will be in one layer and we only have to set up the player's layer filter once. If it were a tag filter you'd have to keep adding new tags you create for new enemies to the player's tag filter.
|
|