Search Unity

Assets Third Person Templates by Invector

Discussion in 'Works In Progress' started by Invector, Aug 20, 2015.

  1. Pat19645

    Pat19645

    Joined:
    Apr 17, 2014
    Posts:
    14
    I'm trying to use Sentio Darkness Warlord (RAIN indy AI character) together with the Third Person Controller, but i can't manage to send damage en let it show on hud. I'm new in Unity and all help is welcome.
     
  2. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    You can see the script on that Ball called "ObjectDamage.cs" if you wanna cause damage by Collision, you can even use this exactly script.

    // apply damage to PlayerHealth
    hit.transform.root.SendMessage ("TakeDamage", damage, SendMessageOptions.DontRequireReceiver);
    // activate the Ragdoll
    hit.transform.root.SendMessage ("ActivateRagdoll", SendMessageOptions.DontRequireReceiver);

    or if you wanna make direct damage by a method, you can use
    ThirdPersonController.instance.transform.root.SendMessage ("TakeDamage", damage, SendMessageOptions.DontRequireReceiver);
     
    Pat19645 likes this.
  3. BloodHound92

    BloodHound92

    Joined:
    Dec 21, 2013
    Posts:
    40
    Hello again @Invector ,

    I have a slight problem that I have been trying to deal with. I created a custom character using a model from Fuse and everything works well except whenever I am sprinting. Occasionally the model for my character will jump up for a few frames and then come back into his normal location. Like I said this is only a few frames so it is a little hard to spot, but when you do see it, it makes the movement look very jerky. I have tweaked the capsule collider and that does seem to lessen the problem, but it is still there nonetheless.

    Do you know what is causing this bug? I am guessing it is a matter of just tweaking a few variables, but I am unsure.

    Here is a short little video I made illustrating the problem. It will be hard to spot because it is very subtle. Just look for some jerky movement when the character is sprinting.



    Please let me know if you have a solution and thank you for your time,
    BloodHound92
     
  4. BloodHound92

    BloodHound92

    Joined:
    Dec 21, 2013
    Posts:
    40
    Make sure you watch the video in Full screen in 1080p @ 60 fps. Otherwise you might not spot the jumpiness.
     
  5. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Pretty cool model @BloodHound92!

    You say that you modified the capsule collider, make sure that the base is align to the floor, like this:



    And also, it can be the Step Offset, make sure that is not touching the ground, like this image:
    Step offset is for sters, it helps the character to walk on higher steps, so you just set up this line like this on the Player Inspector in the variables Step Offset Start, End and Fwd

     
  6. BloodHound92

    BloodHound92

    Joined:
    Dec 21, 2013
    Posts:
    40
    Thank you for the compliments @Invector . I used Fuse to create the model. It's a great tool for any developer who wants great looking models without spending hours in a 3D modelling program.

    So back to the subject at hand, I kinda traded in one bug for another. I adjusted the step offset and now the character doesn't jerk up and down, which is great, but the character now jerks forward and backward in a similar fashion to the original bug. The character will jerk only for a few frames and it is usually while the character sprints. The character usually will do this about 3 times in one full sprint.

    Now I thought that this might just be the running animation looping, but I don't notice the jerking when I fire up the mobile demo scene with the character provided in the asset.

    So this is a screenshot of how my character is currently set up after I adjusted the step offset.
    ThirdPersonController.jpg

    I also made a video which can be seen below. I noticed something peculiar happen when I was making the video. I turned on the debug tools and saw that the "GroundDistance" variable was constantly fluctuating. I would think that GroundDistance should remain at 0 while the character is on a flat surface, but I am not entirely sure how that variable works.

    Once again, make sure you watch the video in Fullscreen in1080p @ 60fps to notice the bug.


    Sorry for the long post. I am just trying to give as much data as possible so that this problem can be nipped in the bud. This bug hasn't changed my opinion of this asset. I still really like the asset and think that it is pretty amazing.

    So let me know what you think. Let me know if you notice the jerkiness in the video or if you just think I am crazy. My project is very simple right now so I could post my project folder if that would help as well. It might be easier to notice the jerkiness if you run it on your own machine.
     
    Dproboy likes this.
  7. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    @BloodHound92 the set up of your character seem to be all right, this little 'flik' seem to be a animation problem aparently, try import your character into mixamo website and bake a new sprint animation, then import and replace the sprint animation to see if this works, if not, upload your project and send to me in a private chat please, I will take a look ;)
     
    BloodHound92 likes this.
  8. Pat19645

    Pat19645

    Joined:
    Apr 17, 2014
    Posts:
    14
    Thanks for the help and thanks for the nice asset Invector!
    It's working now :)
     
    Invector and Dproboy like this.
  9. bxycbxcn-xgh

    bxycbxcn-xgh

    Joined:
    Jul 28, 2014
    Posts:
    5
    Sorry if I miss a post, but would it be possible to use your template as fps controller, if the camera is set (in)to the head?
     
    Dproboy likes this.
  10. ThemSellech

    ThemSellech

    Joined:
    Sep 28, 2013
    Posts:
    3
    Great look !
     
  11. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Well... we design to be a 3rd Person Controller (that works for 2.5D, topdown and Isometric as well), First Person can be a little trick to adapt for, but I think it's possible if you know your way around coding and stuff.

    Your character has spectural? I don't really understand your question man lol, try send me some screenshots on the chat.

    Thanks!!
     
  12. bxycbxcn-xgh

    bxycbxcn-xgh

    Joined:
    Jul 28, 2014
    Posts:
    5
    Coding skills should be no problem ( I hope :rolleyes: ), but could you please enumerate some points, where you see difficulties?
     
    Dproboy likes this.
  13. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Hmmm do you want to make the First Person the main locomotion? if so... we can start with the animations, their not prepare for First Person so the camera will occasionally enter the character mesh, and the main locomotion is the free directional, that means that the character rotate around the camera and not with the camera, that's the behaviour of the secundary locomotion, that is strafe (strafing can work better with First Person)
     
    Dproboy likes this.
  14. bxycbxcn-xgh

    bxycbxcn-xgh

    Joined:
    Jul 28, 2014
    Posts:
    5
    I thought about using ufps, but I want to use some sort of character generator like uma. As ufps use arms parted from the body I think the effort is hery high too. :(
     
    Dproboy likes this.
  15. bxycbxcn-xgh

    bxycbxcn-xgh

    Joined:
    Jul 28, 2014
    Posts:
    5
    @Invector It should be possible to hide parts of the body (e.g. head ) to minimize problems with the camera, but I'm with you with the animation problem.
     
  16. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    535
    Last edited: Dec 2, 2017
    Dproboy likes this.
  17. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Hi @nxrighthere, in fact the Step Offset is doing this! - thanks for reporting
    I just take a quick look at the script and a quick way fix is to low the value of 10 to 3.5f on the method StepOffset(), the character will become more stable and still make the step offset, but not so fast.

    We will take a better look at later and see if this method need improvement!
     
  18. jroto23

    jroto23

    Joined:
    Oct 19, 2015
    Posts:
    80
    Can you walk backwards with this controller? Also I noticed the pan speeds were too slow and it was mouse steer. Am I ale to turn off mouse steer and just configure AWSD? Are camea pan speeds adjustable?
     
  19. deverolirc

    deverolirc

    Joined:
    Jan 19, 2014
    Posts:
    326
    Here is a bug/issue: If you build the demo scene "3rdPersonController-Mobile" to android, it build correctly to the device and inputs etc work good. But when you then collide with a damage object and ragdoll, the "get up from ragdoll" animation plays fine but then the game hangs and no inputs get processed. This is using Unity 5.2.2f1, a new clean empty project and version v1.1 25/10/2015 of this asset.
    This bug also happens if you run the scene in the editor. No error is generated in the Unity console window. This is the debug window when it freezes. Not sure what we're doing wrong :( Is it maybe something to do with GroundDistance being -0.01 ??? It works fine if the control scheme is standalone
     
    Last edited: Nov 10, 2015
  20. dansta2k

    dansta2k

    Joined:
    Apr 24, 2015
    Posts:
    10
    Hello Invector

    When my character is in a positive y position the blending from ragdoll to animation is fine.

    When it is in a negative y position the blending seems to cause the character to fly up to zero for a split second.

    Any thoughts?
    Thanks
     
  21. dansta2k

    dansta2k

    Joined:
    Apr 24, 2015
    Posts:
    10
    The issue stops when I change the way you initialize the root position in your ragdoll script


    newRootPosition.y = 0; -----> newRootPosition.y = transform.position.y;

    if my solution is not correct please let me know what I should be doing if there is a better way.

    Regards
     
  22. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Hey @jroto23, you can walk backwards in the Aiming mode, and you can change the mouse sensitivity on the Camera Inspector if this is what you mean by camera pan speed, if not, I guess I don't understand lol

    And the mobile issue is very easy to fix, I think that I already post the solution here, but here it goes:
    Just drag the Mobile Controls gameObject below the HUD on the Hierarchy.

    @dansta2k Here it seems to work fine, try record a video showing this issue if you can
     
  23. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Hey guys, we will release a small v1.1a HOTFIX this week with some fixes and improvements :)

    This hotfix includes a pretty cool new feature >
    - Culling Fade: when the camera is too close to the character, the mesh fade out

     
    Last edited: Nov 10, 2015
    Dproboy and jayimagination like this.
  24. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    You can update directly from the AssetStore when they approve ;)
     
  25. vmbgify

    vmbgify

    Joined:
    Oct 10, 2015
    Posts:
    1
    Hi Invector,

    I stumbled upon a bug. When using the "3rd person controller" -> "Create New Character" to add a new character, the following error appears:

    Code (csharp):
    1. MissingComponentException: There is no 'Rigidbody' attached to the "3rdPersonController" game object, but a script is trying to access it.
    2. You probably need to add a Rigidbody to the game object "3rdPersonController". Or your script needs to check if the component is attached before using it.
    3. CreateCharacterEditor.Create () (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/CreateCharacterEditor.cs:214)
    4. CreateCharacterEditor.OnGUI () (at Assets/Invector-3rdPersonController/Scripts/CharacterCreator/Script/Editor/CreateCharacterEditor.cs:127)
    5. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Interestingly enough, it seemed to be working yesterday when I tested the asset for the first time. Any idea on how this can be corrected? I went ahead to the code and added RigidBody manually, but then it said there was no collider, so I guess something with the setup of _3rdPerson went wrong? No other warnings or messages were displayed, just the error above.

    Thank you in advance!
     
  26. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    @vmbgify I saw this error before, but I'm not sure if I remember how the guy fixed, are you using Unity 5.2.0+ right?
     
  27. jayimagination

    jayimagination

    Joined:
    Dec 20, 2012
    Posts:
    80
    I'm just now getting a chance to check this template out and I recieved one error
    Assets/invector-3rdpersoncontroller/editor/crossplatforminput/crossplatforminputinitialize.cs(8,18): error cs0101: the namespace "unitystandardassets.crossplatforminput.inspector' already contains a definition for' crossplatforminitialize'

    Any idea on how to fix this?
    Thx in advanced!!!
     

    Attached Files:

  28. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    It says that you already have a script call crossplatforminitialize in your project, try importing the template into a clean project or just find the duplicate script and remove it
     
    jayimagination likes this.
  29. dansta2k

    dansta2k

    Joined:
    Apr 24, 2015
    Posts:
    10
    @dansta2k Here it seems to work fine, try record a video showing this issue if you can[/QUOTE]


    Thank you, since my solution seems to work I dont think its necessary unless you would like to see it if it will help you. More useful info I would like to know is whether you could set me in the right direction in terms of being able to allow the character to roll mid jump and the viability of wall running?

    Thanks again
     
  30. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    For the Wall Running take a look at how the Ladder work, it's a very similar behaviour because you gonna need 3 states, enter, doing and exit, so you need a trigger to check the conditions to enter the state, then you will pass to actual walking, and finally exit in another trigger. The "roll mid jump" I don't get it, do you have a example?
     
  31. jayimagination

    jayimagination

    Joined:
    Dec 20, 2012
    Posts:
    80
    Just an idea. After trying to setup a custom scene maybe you could do a video showing the process of setting up a custom scene using the template. I ran into a few issues and I'm sure it would help out people new to it.

    Thanks
     
  32. dinaga

    dinaga

    Joined:
    Oct 19, 2015
    Posts:
    6
    Hello,

    I've purchased this awesome asset and it has been a blast so far.
    I just wanted to say thank you very much for making it. :)
    Good luck with adding new features!
     
    Invector likes this.
  33. MalcolmWashington

    MalcolmWashington

    Joined:
    Jul 16, 2015
    Posts:
    12
    hi dear publisher.
    this package is awesome.
    but character do not die.
    even his health become 0.

    i want the ragdoll true and never change again, when current health become 0.

    if possible would you share playmaker example ?
     
    Dproboy likes this.
  34. conneraiken

    conneraiken

    Joined:
    Oct 5, 2015
    Posts:
    4
    Dont want to call this a bug yet but I am having an issue. Fresh project, fresh import, even on your demo in the webplayer.

    Seems like the crouch sometimes spazzes out and even if i continue holding, every couple seconds the character will dip up and dip down.

    Is this due to the IK issues with the unity bug or are you aware of this?
     
    Last edited: Nov 11, 2015
  35. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    @jayimagination Take a look at our documentation, in the section "Creating a new Character " it has all the basic information that you need to set up your character in a new scene, but yeah, I want to make a video tutorial showing every variable at the Player's Inspector and how to set up the character too, but I'm just finishing my final semester on college and it's crazy lol, hold on for a couple of weeks and I will make it :)


    Thaaaaank you for using our asset @dinaga :D

    Hi @MalcolmWashington, this is very very easy to do, in the Character script we already have a method call TakeDamage, that has a if (currentHealth <= 0), and you can call your method to reset the scene or do whatever you want to do when the character lost all the health.

    And if you want the player to not get up, just open the Ragdoll script and you can add this condition on the FixedUpdate when they call the method to get up the player, the health must be greater then 0.

    Code (CSharp):
    1. void FixedUpdate()
    2.         {
    3.             if(inStabilize && tpController.currentHealth > 0)    StartCoroutine(RagdollStabilizer(2f));
    4.         }
    @conneraiken I just tested the webplayer here and it's working fine man, do you have this issue on a specific spot? or just at any time you press C, the player will eventually spazze?
     
    jayimagination likes this.
  36. conneraiken

    conneraiken

    Joined:
    Oct 5, 2015
    Posts:
    4
    @conneraiken I just tested the webplayer here and it's working fine man, do you have this issue on a specific spot? or just at any time you press C, the player will eventually spazze?[/QUOTE]

    Hmm - I cant get it to do it now.. But try doing a 360 with your camera while you are crouching.
     
  37. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Hmm - I cant get it to do it now.. But try doing a 360 with your camera while you are crouching.[/QUOTE]
    Still works fine man, try testing on a different input device like a gamepad or other keyboard, perhaps is a external input issue o_O
     
  38. jayimagination

    jayimagination

    Joined:
    Dec 20, 2012
    Posts:
    80
    Looking forward to it. I'm going to freelance a programmer once the shooter template comes out, so any learning materials will be great!
     
    Invector likes this.
  39. dansta2k

    dansta2k

    Joined:
    Apr 24, 2015
    Posts:
    10
    Thank you for giving me a summary for the wall running really apreciate it.

    For the "roll mid jump" I would like the player to be able to roll should they choose to if they are in mid air or during a jump. However I feel that I might be able to either explain this better once I sort out the wall running or find the solution myself at that point.

    Thanks for your time
     
    Invector likes this.
  40. MalcolmWashington

    MalcolmWashington

    Joined:
    Jul 16, 2015
    Posts:
    12
    dear invector team,
    Thank you so much.
    1. void FixedUpdate()
    2. {
    3. if(inStabilize && tpController.currentHealth > 0) StartCoroutine(RagdollStabilizer(2f));
    4. }
    this works. anymore my character will die :).

    this asset deserves every penny of its price.
     
    Invector likes this.
  41. Rouslan-Vodenitcharov

    Rouslan-Vodenitcharov

    Joined:
    May 1, 2015
    Posts:
    9
    I use the mobile version and have the following problems.

    1. The crouch Input is not working.

    I have resolved the problem. In Third Person Controller script line 200 I changed with "else if (! PressToCrouch)" not pressToCrouch.

    2. I get no foot and collision sound with the new character.

    Else is everything perfect.
     
  42. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    1- just check false on the Player Inspector autoCrouch option
    2- just add new audioclips (check the documentation), the demo scene is just a example, but you can add any type of footstep sounds to different textures
     
    Dproboy likes this.
  43. Rouslan-Vodenitcharov

    Rouslan-Vodenitcharov

    Joined:
    May 1, 2015
    Posts:
    9
    Many thanks,

    I think the ragdoll had no contact with the ground. Now I have tested with a new character and everything is okay.:)
     
    Dproboy and Invector like this.
  44. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Yo!
    If it's only replace Time.deltatime with Timeline.deltatime you could simple use "Find And Replace > Replace in Files" in the Visual Studio. We don't have this asset, but I will write down, and depending on how much it's requested, we can take a look :)
     
    Dproboy likes this.
  45. Carlos-Rovira

    Carlos-Rovira

    Joined:
    Dec 23, 2014
    Posts:
    58
    Hi!,

    just tested 1.1a and feel the asset more robust. Thanks for all the improvments and bug fixing. Keep the great work!

    Some things to comment:

    1.- Here's an error showing up:

    NullReferenceException: (null)
    UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:72)
    UnityEditor.Editor.GetSerializedObjectInternal () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:151)
    UnityEditor.Editor.get_serializedObject () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:144)
    UnityEditor.GameObjectInspector.OnEnable () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:88)

    2.- I'm very interested in "Auto action" feature. I tried with a ladder in "top-down" demo and works ok but for exit the ladder in the lower end.
    I think this bug is needed to be solved since If I use "auto action" all should be configured in this way to maintain game consistency.

    3.- The ladder animation, although good done, is a bit "robotic". I think the bot is very rigid and should have a more realistic movement.

    4.- I continue asking for PUSH/PULL animations since I'd would want to get it with the asset. I asked for this twice before but no responses about it. Hope authors could consider this feature, since I think is a great one to be able to push objects (i.e: a cube) and pull objects.

    5.- Another bug I see is in isometric demo when click between the two walls marked with "JUMP OVER". Some times the bot turns 180º and make a jump over again in the wall just jumped.

    6.- I really need a good integration with Adventure Creator asset. Could it be? I think many people should want it since is a very popular asset. Hope it could be in a 1.2 :)

    7.- where's the right place to extend/modify movement and make the player walk fixed steps (i.e: 1 meter ), I want the player always be in the center of a Tile (1mx1m).

    Thanks! and great to see this asset continue evolving gracefuly. Keep the great work!! :)
     
  46. Zeroner

    Zeroner

    Joined:
    Nov 17, 2015
    Posts:
    2
    HI :)

    I`m working with this asset, and it is awesome, I like a lot, but sinces I bought it I have a little problem.

    When I try to add a character everything work great, except when it needs to work with any component from the demo, I dont know if it has anything to do with the charactor or the environment but my gravity is not applying to my character.

    If you can help me please, I will thanks a lot :)
     

    Attached Files:

  47. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Hey Carlos,
    1 - this error shows up when you load the project... or when trying to create a new character?
    2 - hmmm this can be fixed by rotating the character 180 instead of exit and stare at the ladder, but I will think of something else to fix in the code.
    3 - We still can't find a nice 3D animator, so I made this animation my self lol *sorry*, and that's one of the reasons of your next questions.
    4 - A part from the animation, there is many types of push/pull mechanics, only forward/backwards, rotate, grab, move and drop... We need to study a nice way to do this, but relax it is on the To-do list ;)
    5 - Hmm I will try to reproduce this and see what's going on
    6 - It's on the list, now that we cover most of the problems with compatibility, we will take a look at some integrations, but this could take a while because we don't own most of this asset's, so we need to study then and see how they work and then see how this integration can be implemented in our asset.
    7 - Our controller works with root motion, so you just need to open your walk animation and move 1 meter at step, bake and export.
     
    Carlos-Rovira likes this.
  48. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    Take a look at your colliders, maybe the character creator set up some weird capsule collider size.
    Just select your character and post another screenshot with the Inspector, and we will take a look if something is wrong
     
  49. Carlos-Rovira

    Carlos-Rovira

    Joined:
    Dec 23, 2014
    Posts:
    58
    Hi,

    1.- I'm on a Mac (maybe is good to notice the platform where the error shows up). I'm tesint 1.1a without already use my own character. Is shows when I hit play in a demo scene.
    2.- Although you see how to solve for general purpose, to do the rotation you propose, could you share the best way to do it? Scripting? and where is the right zone to extend?. I want to know the best practices for extend and customize this asset.
    3.- Would be great. I think the shoulders should move and to reflect the arms effort and then the body should follow the movement. Thanks!
    4.- Thanks! I'll be waiting for this anxiously. As you said there's many implications and I'll want to use it in "auto action" mode as the rest (I want to maintain the controls simple as I want to include mobile platform in my game as principal). Taking into account the great usability in the rest of actions/animations in this asset, I'm sure you'll get the best solution! :)
    5.- Thanks. It's easy to get this bug run. I think is due to interaction with the trigger, that makes the character perform an action that should not happen (since there's no click there)
    6.- If I could help preparing a project template to let me know. I see other assets in the store similar to this having this kind of integration, but I prefer this one since it feels more natural and solid to me that the others, although I have to wait for full integration.
    7.- I'll try what you proposed, since I never think that kind of solution could be possible. Thanks! :)

    Many thanks for your support! :)
     
  50. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    872
    @Carlos Rovira are you running on Unity 5.2.0+ ? I will try to get a Mac to test this error
    - About the ladder and auto actions, I will find the better solution and post here soon, along with the jumpOver issue :)
     
    Dproboy likes this.