Search Unity

[RELEASED] TPSA - Third Person Shooter System (template)

Discussion in 'Assets and Asset Store' started by Stiffx, Jan 24, 2015.

?

What additional pack would you like to see in TPSA?

Poll closed Apr 1, 2015.
  1. Enemy AI Shooter

    44.4%
  2. Friend AI (like sherry from Resident evil 4)

    55.6%
  1. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Right, First set all of them to 0.5 , x,y,z,w then set your TPSA_PlayerController "Force Aim For Testing" option to true while in play mode. And change your x,y,z,w variables from TPSA_AimController. Once you satisfied with the results store them to a text editor stop the game and place them to the weapon you wore using at TPSA_WeaponController.
    look: http://prntscr.com/6giboq

    have fun
     
    drewradley likes this.
  2. sovietboss

    sovietboss

    Joined:
    Jan 18, 2015
    Posts:
    8
    Anymore news on a possible tank control/static camera angle update?
     
  3. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Hi there @sovietboss, this is not in my road map for now. But you can try to do this.
     
  4. PROTOFACTOR_Inc

    PROTOFACTOR_Inc

    Joined:
    Nov 15, 2009
    Posts:
    4,054
    You mentioned that the climbing was already implemented. but it's mostly a climbing from wall with a unique height. I was more thinking about having some kind of climbing up / down loop animation with a pull up and get down animation so it's possible to climb on surfaces without any height restriction. From a big rock to a high cliff for example. Or maybe I missed something, though I'm always reading what's happening on this thread.
     
  5. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    If you pay attention to what I've answered to @drewradley you see that the jump has no limitation, it calculates the Object scale diference to the player scale and do the jump by code. After that is up to the animation. In other words you can use a higher object to jump as long as the Raycast test hit the object in front, it should work just fine.

    Although you can add a little help to the jump calculation by setting a bit more higher jump after the calculation as I said before jumpHeight += 4.6f; or jumpHeight += 8.0f; whatever you think works best for your case.
     
    Last edited: Mar 14, 2015
  6. Pucelano

    Pucelano

    Joined:
    Mar 10, 2015
    Posts:
    7
    I downloaded the update, but, how I can install it?. Thanks.
     
  7. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Hi therem you just need to delete the old version and open this one, it's a normal unity project.
     
  8. Acun_Pearce

    Acun_Pearce

    Joined:
    Mar 11, 2015
    Posts:
    7
    Are you make all of these animation ?
     
  9. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Yes at least most of them, some animations like Slide down I got from unity Raw mocap sample data, transfered to my character and add some modifications. The other ones recorded from mocap and corrected them at 3d software "that's why some times you see some jitters" no big deal. You can take a look here
    when I started to create some of the aiming animations.
     
    Skarabx likes this.
  10. Pucelano

    Pucelano

    Joined:
    Mar 10, 2015
    Posts:
    7
    Perfect, thanks!
     
    Stiffx likes this.
  11. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    My characters don't look up and down as nicely as yours. In fact, they barely seem to bend at all. They only have a hip, abdomen, and chest for the spine not pelvis/spine/spine1/spine2. Could that be the problem?
     
  12. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Not at all, Could you please send me pictures of your Aim setup? Maybe I can help to set it up a better way. :)
    Cheers
     
  13. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Sure. What specifically do you need to see? Just the aim controller component?
     
  14. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Just for now, send me that info, a print screen of your all setup would help too.
     
  15. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Here are the three control scripts:
     

    Attached Files:

  16. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    And here is the camera. Thanks!
     

    Attached Files:

  17. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    I see, there's nothing wrong with the setup that's for sure. Now please check your inbox.

    Thanks
     
  18. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Hi there @drewradley ,

    Here are the notes about your issue:

    1 - At your TPSA_AimController set Rotate Torso to FALSE at the inspector. (this feature is for crouching while in cover only)
    2 - At the same script TPSA_AimController change the line
    Code (csharp):
    1.  
    2. rot = new Quaternion(Spine1.localRotation.x, Spine1.localRotation.y, Spine1.localRotation.z * Spine1Rotation, Spine1.localRotation.w);
    3.  
    to
    Code (csharp):
    1.  
    2. rot = new Quaternion(Spine1.localRotation.x * Spine1Rotation, Spine1.localRotation.y, Spine1.localRotation.z, Spine1.localRotation.w);
    3.  
    That's the reason you could not use a smooth spine rotation, because your character rotation runs at the X axis while mine does at the Z axis. I'm already adding a selector to that script so you can change in inspector, it will be available next update.

    And just because I'm a nice guy here's the visual changes to make your aiming better.
    At the Pistol_Lhand transform (child of Pistol) use this settings: http://prntscr.com/6hqprd
    and at your TPSA_WeaponController (via inspector) at the pistol use this settings to the Right rand rotation:http://prntscr.com/6hqqf0

    "Now after all the support I gave and after seeing this running you can let go the "wasting money" feeling :D"
     
    Last edited: Mar 17, 2015
  19. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Here is the Aim Controller update, just in case some of you guys has different spine rotation;
     
  20. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Oh, it definitely does not feel that way. Thanks for all your help! It works great now.
     
    Stiffx likes this.
  21. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    My pleasure. Have fun :)
     
  22. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Hi there guys, I've received some in-box messages about problems to setup a new character. For that reason I'm working on a new tool to help you setup your new character from scratch. Also I'll upload a detailed video tutorial about every step from start to the end. Anyways this tool will help you to not to miss small details. You just have to pay attention to the error messages displayed at the bottom. ("This will be avaliable next update")
     
  23. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    More news.
    For those who doesn't want to wait full update, I've added an option "Scripts Only" at www.stifix.info so you can download the scripts update only. This time I bring to you a new and faster way to setup a new character. "By the way at the video you see that I had to add a Animator component manually to the controller (at 5:59), it's fixed now." Please let me know any issues you have.

    "Ohh if you follow this new tutorial, the weapons and inventory will not fully work, I'm creating a video for those too." This is only for basic setup, I mean locomotion.

    I hope to hear from you what you think of this new feature, good, bad, sucks haha anything.



    As soon as you download the scripts just replace them at your TPSA project.

    Thanks
     
    Last edited: Mar 17, 2015
  24. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Are there any other places that use a fixed axis like that? If one is off, pretty sure others are as well. Might explain why my figure default to shooting himself in the face and the left arm being twisted the opposite so he is holding the gun with the top of his hand and not the palm.
     
  25. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Could you please post a picture of what you said? And just for the record: no, the only bone that rotates dinamicaly is the middle spine.
     
  26. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I know this can be fixed by adjusting the various rotation adjustments; I just thought since it is so drastically different than yours (since I used your setting exactly) it might be something similar with this.
     

    Attached Files:

  27. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    I see... To fix the left hand you should rotate your LHandIK transform child of the pistol transform. Rotating and positioning it while in play mode and store the values should work just fine.

    About the right hand you need to adjust that at your weapon settings.

    Even if you copy from a same sized model the bone rotation can be very different. That's why you always have to add your own rotation. Maybe "Just maybe" in the future I can try to rotate it dynamically but still the manual adjustment give us a better looking to the aiming. Cheers :)

    Btw the right hand follow the aiming target of the camera, that's why we can have perfect aiming to target with this pack.
     
  28. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Yeah, I understand that. I was just hoping that maybe there was an easy fix like the look up and down. You already provided me with help getting the hands fixed - even provided the exact numbers I needed for the pistol (I really appreciate that!) Guess I'll just have to do manual adjustments for all my weapons. Hopefully, they will all be pretty similar so I can use the pistol as the base and make fine adjustments from that.
    Anyway, thanks again for all your help!
     
  29. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    You are very welcome
     
  30. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Hi there,

    I've made some changes to the scripts "While in editor", now some of the options including the camera pivots includes Sliders and a better description.


    Another thing is that shoot from cover while crouching has been improved.


    I'll be uploading this version in the next few days, but one important note is that "this is the far as the version for unity 4 can go". The next updates will be available for unity 5 only. I'll still support the ones who use unity 4 to help them use the project;

    Cheers
     
    drewradley likes this.
  31. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Very nice
     
    Stiffx likes this.
  32. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Thank you @Archania there's more cool features to come. :)
     
  33. silentking

    silentking

    Joined:
    Mar 6, 2015
    Posts:
    14
    Recently purchased this package to save my butt weeks/months figuring it out.

    Super impressed with everything, the support, the updates and especially the open mindedness of the developer.

    Honestly warms my heart.

    Fair play mate!
     
    Stiffx likes this.
  34. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Wow man/woman, thank you very much for this. Those kind of comments keep me awake at night working to make this project better and better. I really appreciate that. You can be sure that I'll make it better.

    :rolleyes::) I'm so happy right now with all the support you guys give to me, that's why I keep on going.

    Thank you again, please stay around there's more to come.
     
    r3ndesigner and silentking like this.
  35. r3ndesigner

    r3ndesigner

    Joined:
    Mar 21, 2013
    Posts:
    143
    Amazing stifix, i was travelling and now when i see the post a lot of new features. Great vehicles stifix ll fit very nicely at my project.
     
    Stiffx likes this.
  36. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Hey, when I try to reload the sniper rifle it just goes to idle and can no longer attack, etc. I'm sure it;s something simple, but I can't seen anything obvious. Thanks!

    edit: figured it out; needed to set up a reload state in the animator for it.
     
    Last edited: Mar 19, 2015
  37. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I am using the rocket as a base for spell casting and want to know how to make the player bend when aiming the "rocket". Also, I'd like the right hand to be up a little higher and want to adjust its rotation of the unaimed state. I have my animation so the hand is palm up when idling and the IK twists it to the side so I would like to fix this.

    Thanks!

    edit: does it have something to do with the left hand IK object on the weapon? I only wanted one hand to be used so I removed that from the weapon. But that doesn't seem to be it.

    edit again: I'm using my own animations. Could they be messing with the look up and down? I put the animation I am using on a different weapon and it too stopped looking up and down.

    edit three: Yeah, it's got to be my animation. I changed it back to the one it came with and it now looks up and down. How do I prepare my own animations to use in your system? There's got to be a trick or something I'm missing.
     
    Last edited: Mar 20, 2015
  38. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Hi there, I'll try to explain ;);

    "There's no trick to bend Up/Down, it's a very simple logic"
    The way I designed the scripts you should have one weapon selected (or at least a Id weapon set to the TPSA_PlayerController witch will set that value to the Weapon parameter of Mecanim).

    Ok, with that said, once you set that value two things starts working:
    1 - TPSA_IKSolver (Activated by IsHoldingWeapon boolean variable set by TPSA_PlayerController)
    2 - Mecanim Layer 1 (ArmsOnly)

    If you use right mouse button then other two things starts.
    1 - TPSA_AimController (Activated by IsAimed boolean variable set by TPSA_PlayerController)
    2 - Mecanim Layer 2 (UpperBody)

    And that's the point when the TPSA_AimController uses the aim pose at Mecanim Layer 2 (UpperBody) to bend according camera Y rotation.

    So, if you do not change anything in the system this is what you need to do to use custom animations.
    First set your weapon ID at TPSA_WeaponController, ad the aim pose to the Mecanim Layer 2 (set the transitions parameters to the weapon id (just look at any one of the existing transitions) and nothing else. It's a very simple approach.

    Now, I know you want to do something different from a weapon, once you understand the flow, you can easily implement your condition to bend your character. It's just a matter of activating the TPSA_AimController and the Mecanim Layer 2 with the animation you want :D

    I hope it helps.

    Cheers
     
  39. Skarabx

    Skarabx

    Joined:
    Mar 3, 2015
    Posts:
    6
    I just bought this and I have to say that I am rather impressed and completely thrilled to be working with his asset! Thank you very much for this!
     
    Stiffx likes this.
  40. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    If I put your animation clip in there it works fine, put mine in there and it stops. Is there something I need to do to the animation clip or something?
     
  41. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Thank you @Skarabx for your purchase and very kind comments. I'm really happy that you like this product, please download the last updates and feel free to post your results or questions I'll be happy to answer.

    Thanks one more time :D
     
  42. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    The animation rig must be Humanoid... that's all, please post a picture of how did you replace my animation with yours.
    Click on the clip and take a picture too.
     
  43. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    It is humanoid. All I did was drag my clip and drop it over yours. Here are the various settings as well as the animation itself.
     

    Attached Files:

  44. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    I was not able to test your animation because I need the t-pose model first. take a look
    http://prntscr.com/6iz3l4

    Send me the T-pose base model

    Cheers
     
  45. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Here is a T pose.
     

    Attached Files:

  46. Skarabx

    Skarabx

    Joined:
    Mar 3, 2015
    Posts:
    6
    I actually do have a question and it may be version related. In ver5 of Unity, in my testing I can't seem to get the zombie to attack the character. I can get the zombie to move and follow the character, etc, but I just can't seem to get it to attack and do damage. Do not have this problem in the earlier version of Unity and I am wondering if it has to do with my lack of scripting knowledge or something I am not plugging in right. Thanks in advance!
     
  47. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    hmm I think this might be my mistake. When I upgraded to unity 5 I was so focus to the road map and bug fix that I forgot to test the zombie. I'll run some tests and let you know whats going on.

    Sorry about that :oops:
     
  48. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Hi there, I've tested your animation, and its bending, but at wrong rotation because your character uses different rotation bone setup than my character. But if you use the same character as your main Avatar it should work just fine, but if you are using one character avatar as main char and then using another character avatar animation it might be the problem.
    I've done the same thing as you did, replace the 6 animation with yours.
     
  49. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    All right, I'll check that. Thanks for looking into it for me!
     
  50. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    No problem :)