Search Unity

UFPS : Ultimate FPS [ RELEASED ]

Discussion in 'Assets and Asset Store' started by VisionPunk, Mar 9, 2012.

Thread Status:
Not open for further replies.
  1. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    In case anyone's interested, I just made this short tutorial on how to add a Melee Weapon with UFPS.

    [video=youtube_share;VIKicW5GyXA]http://youtu.be/VIKicW5GyXA
     
    Last edited: Feb 12, 2014
  2. primus88

    primus88

    Joined:
    May 14, 2013
    Posts:
    611
    For the first question, yes you can. In my game I needed the same weapon to have different damages based on the attacked enemy. You just add a certain damage method (for example physical, ethereal, fire, ice etc..) and you make if statements for each in the method that delivers the damage message.

    Following this logic, most likely you can do the same for different degrees of zooming in.

    I hope this helps.
     
  3. Andy_

    Andy_

    Joined:
    Dec 12, 2013
    Posts:
    80
    Hello cjow,
    Does this also happen in a fresh UFPS scene?
    Could you try some different combinations to try to pinpoint which part may be failing?
    Thanks!
     
  4. Andy_

    Andy_

    Joined:
    Dec 12, 2013
    Posts:
    80
    Hi neroziros,
    This should be possible by just increasing the acceleration on the controller, check out this section in the manual.

    Acceleration

    Hope this helps!
     
  5. Kala-L

    Kala-L

    Joined:
    Feb 15, 2014
    Posts:
    3
    This asset is amazing and very easy to setup. Good job!

    I just want to know if there is an appropriate way to adjust the size of the character? I've tried to modify the scale of the player object and it doesn't work as it won't scale the collider of the character controller. I've tried to modify the height/radius of the character controller alone and it won't adjust the camera position. Modify both doesn't seem to work too.
     
  6. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    select the FPSCamera and in the inspector go to the Position Spring and set the Y value to something less. I do real-time design vis, and this character is giant, 2 meters/6+ feet tall. He almost looks like he's going to hit his head on door frames. And if I add any characters he towers above them. Setting the spring position only partial works, if you switch cameras (deactivate the player gameobject, then re-activate it) the camera pops up and back down. It's very annoying. I have a hard time criticizing this asset as it's so well thought out in so many ways. But not being able to change the height seems like an oversight. I would love a way to hard code a height into this. I know what i'm using it for may not be their target audience, but what is someone wanted to use this for a dwarf character or something, they would be sol. Adjusting the spring position was the way recommend to me a while ago, they update it frequently and this form is busy, it's hard to keep up with the updates/posts. There may be a better way now, I don't know.
     
  7. Antigono

    Antigono

    Joined:
    Oct 20, 2013
    Posts:
    63
    Hi, first sorry for my English,
    I'm using for quite UFPS, but recently I am interested in add / change the weapons available.

    With Meele weapons I have no problem. The problem comes when wanting to add "non meele" weapons. I can easily create the models in blender (if I'm doing well, since I'm not an artist, but pure programmer).

    Anyway I am adding a gun directly in Unity (as it does 99thmonkey in the video above). playing with some parameters the gun looks good, but the problem is the aim, i cant get it centered, and the UFPS parameters that I can change, make affects to the gun-arma model in "position of rest" but the aiming is unchanged, decentered.
    What can I do? or what parameters can be changed to make the aiming correct?
     
  8. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    In case anyone is interested, here's a short video on how to add a Ranged Weapon in UFPS.

    [video=youtube_share;IYVtWOb_2tk]http://youtu.be/IYVtWOb_2tk

    Fixed the Video. I had to use Screencastomatic.
     
    Last edited: Feb 16, 2014
  9. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,304
    I believe it's a "moving static" issue.
     
  10. Antigono

    Antigono

    Joined:
    Oct 20, 2013
    Posts:
    63
    Thanks for the videos 99thmonkey!
    Really very useful!
     
  11. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Couldn't resist, so I made another Video this time of a Shotgun. It is definitely not as nice as the AAA version, but it works.

    [video=youtube_share;e8-CSCsyf9o]http://youtu.be/e8-CSCsyf9o
     
  12. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Thanks 99thmonkey, those videos are quite helpful. :)
     
  13. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I tried this and didn't notice a difference. I think character controller automatically acts like a dynamic collider; it would be dumb if it didn't, but I wouldn't be that surprised if Unity accidentally missed that. Daisy are you sure you didn't have some extra collider on the player? I've been able to get my framerate back by limiting the number of trees and being careful with the Physics Collision Layer Matrix in the project settings to minimize physics checks. I still have a sneaking suspicion though that Unity is going to deprecate Character Controller soon and tell people to use a RigidBody based controller instead... their new Sample Assets and tutorials all do it that way. Unfortunately the Unity versions are nowhere near as smooth or complete as UFPS is. Oh well. :)
     
  14. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Planning on getting this pack and am wondering something. When I model my own weapon and add it do I need to program it or is there a weapon setup? Like if I want it automatic or manual. I know I could use the included pistol or machine gun script but what if I want a custom one? Also can I add my own reloading animations?

    Thanks
     
  15. Andy_

    Andy_

    Joined:
    Dec 12, 2013
    Posts:
    80
    Hi!
    Yes most stuff is configurable, here is a link to our online manual for adding weapons:
    https://docs.google.com/a/visionpun...m3KzMfsPUGBI/pub?embedded=true#h.nkixsf4qlu2f

    yes it's possible to add your own reload animations , using a regular unity animation

    Hope this helps
     
  16. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Thanks. Going to get it soon.
     
  17. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Got this and have been having a blast. One question though.

    Is there a way to get different bullet decals and particle effects on different layers or textures? Like a wood impact on trees and a spark on metal.

    Thanks
     
    Last edited: Feb 21, 2014
  18. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    Oh, for sure.. and what a great question/idea! by the way. You will need to do your art, making your woodchips, and sparks, etc., via the particle system or via differing decals based upon what the raycast hits when you are pulling the trigger (taking a clue from how the footsteps recognize various terrains, for example), but take a look at how the current stuff works. Start at (select the Pistol to keep it simple) vp_FPWeaponShooter, and go to the Projectile . From the Projectile, go to the Prefab and you will see where all of the sparks and dust and debris and impact stuff is whooshed up via vp_HitScanBullet. Did these guys do some nice work, or what?! ha! Somewhere out there, on the Unity forums, someone has probably already done some nice particles and textures for trees and metal and water and meat and everything. Hope you will share your "how to" when you succeed! (What the heck, there might even be a market for an "Impact" add-on!)
     
    Last edited: Feb 23, 2014
  19. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    I have already made the effects just need a script to put them in. I am just clueless with code. Maybe this can be in the next update.
     
  20. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    So I've been plugging away at tweaking my first weapon, having it nearly complete in terms of motion. There's only one thing left that I've been stuck on for days now, and don't feel close to finding the answer on my own.

    The goal is so when aiming down the sights from any state, ADS performs as quickly as when doing so from idle, walk, jump or switching weapon.

    Currently, aiming down the sight while either running, crouching or reloading introduces a lag, or "slow-mo" effect, causing the gun to move very slowly to its final resting position, both to and from.

    You can test this with the AdvancedPlayer prefab that comes with UFPS using weapon 3. While it is not as pronounced in the demo due to weapon position, it's still clearly visible. Unfortunately, on my weapon this effect is really pronounced, and I can't seem to find where to tweak values from.

    Could anyone perhaps guide me in the right direction? Not a code/scripting type, so I've been fumbling my way via trial and error, and what's in the manual and Knowledge Base.

    Thank you in advance.
     
  21. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    That is a toughie. Some of these things are so subjective. I do not, honestly, see the lag that you mention, using the test case that you suggest. Maybe you could look in the txt files. The presets, I mean. I can't imagine what could be causing your problem. ... Let's try this ... place your "new" weapon into one of the existing slots, cheat and name it so that the system doesn't know that it is yours and not "theirs", if you get what I mean, and see how it functions then. Some of this stuff ... well, you've just got to get lucky ... I know that's not much help, but it's a known phenomenon that lucky is a good thing.
     
  22. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    Hey, listen, everything that I mentioned previously is a "script", or a component that has been populated by trial-and-error. You are going to have to, probably ... unless someone else is listening and decides to "own" this opportunity ... do this for yourself. Your idea is so cool. Look at some of the scripts. The more you "read" them, the better it gets, the easier it becomes, the more demystified, etc.. It's just like learning anything, and I do mean "anything!", so remember that the journey is the part that matters. Since you have "already made the effects", then just go ahead and swap those into the existing sample scenes and see how things go! You might find out that it is much less complex than imagined ... and if not... then what the hell ... make it work anyway! The fun is in the fun. (I think ... duh?)
     
  23. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    Yeah, assumed not everyone would see it; hoping the author does, however. If not, I'll make a video to point it out. I'm sure it can be tweaked; I'm just trying to find what variables are needed to do so.

    Thanks for responding.

    Edit: Off to work, but if no one from VisionPunk responds today I'll make and upload a comparison video when I return this evening. Would really like to get this resolved.
     
    Last edited: Feb 24, 2014
  24. Oatz

    Oatz

    Joined:
    Oct 21, 2013
    Posts:
    11
    Not sure if this the place to ask this, so let me know and I'll move it. I'm having trouble with ufps advanced player capturing the mouse while trying to play with it in game, and the weapons auto shoot until I'm out of ammo, the melee just keeps auto attacking. I imported Shooter AI , could it be a conflict between the two? Thanks for any help.
     
  25. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    Are you using PlayMaker by chance?

    If yes, then read this post on the "Official" forum.... http://visionpunk.vanillaforums.com/discussion/157/the-player-won-t-stop-firing-using-playmaker/p1

    If no, then ... duh!? ha! Update us and we'll grind your problem into dust!
     
  26. Oatz

    Oatz

    Joined:
    Oct 21, 2013
    Posts:
    11
    That got it thanks!
     
  27. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    @VisionPunk

    So, the issue I seem to be having is directly tied to ADS itself. That is, I don't know how to replicate the "snappy" ADS speed of going to and from idle, walk, jump and when the player switches weapons.

    In these cases I am interrupting each state by enabling ADS, and for the aforementioned states it's always fast as desired. However, when interrupting Run, Crouch or Reload there's a delay that occurs that causes the weapon to drag to ADS (and back), rather than fast as with above.

    To get a better view of what I am seeing, simply drag an AdvancedPlayer prefab into a scene, open its tree in the hierarchy and drill down to 3MachineGun, click it. Tick the States tree to unfold, select it's Zoom state. Either edit the default or create a copy to test with, and change the following value:

    Code (csharp):
    1. PositionOffset 0 -0.2232973 0.5 //Adjusted gun distance from camera. By default the butt of the gun is flat against the player's chest. This also better demonstrates the effect I am seeing.
    To see the ADS speed I am trying to achieve between all states, please do the following once you have your adjusted UFPS Machinegun:

    1. Become fully idle, enable and hold ADS, let go. Rinse, repeat a few times.
    2. Walk around. Randomly enable ADS. Stop when you're fed up.
    3. Walk and jump around, randomly enabling ADS. Do this one million times.

    Now, with that ADS speed fresh in memory, please try the following:

    1. Reload the Machinegun, but immediately interrupt it by enabling ADS. The moment Reload is ready to transition to ADS, it will do so with a delay, almost like if in increased gravity.
    2. Run for a few seconds, then enable and hold ADS.
    3. Crouch, and stay crouched. Watch the "drag" by enabling ADS. While crouched, the gun will return to idle once ADS is released at the same, slower speed.

    tl;dr

    Just looking for a way to adjust the ADS speed when transitioning between the Run, Reload and Crouch states. Thank you.


     
  28. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    Friends will you know how to solve it. Mobile pack installed and it happened

    $Sem título.jpg
     
    Last edited: Feb 25, 2014
  29. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    Another thing is that AI takes cover?
     
  30. Andy_

    Andy_

    Joined:
    Dec 12, 2013
    Posts:
    80
    There is a typo in the vp_AIMenu.cs file where the class has been incorrectly named as vp_MobileMenu, thus causing a namespace conflict:
    Rename the class to vp_AIMenu
     
  31. Andy_

    Andy_

    Joined:
    Dec 12, 2013
    Posts:
    80
    Hi Lod3,

    I hear you, thanks for the repro steps , I will do some tests and get back to you

    Andy
    VisionPunk
     
  32. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    Worked nicely, Then hopefully on the AI take cover,
    Can you give me another help.
    The crosshair will not appear at all, I have done everything and nothing


    see $Sem título2.jpg
     

    Attached Files:

    Last edited: Feb 26, 2014
  33. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    288
    Hey Guys, the AAA shotgun and pistol don't seem to be available in the store any more. Are they still being sold?
     
  34. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    Thanks, Andy_.

     
  35. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
  36. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    Friend looks I saw some bugs:
    1 - the enemy with other animations lock you know why?
    2 - The lock on targeting enemy or weapon even after death
    3 - could hand ammunition to show the quantity of clips

    I am using other animations, it works but crashes occasionally
     
  37. Andy_

    Andy_

    Joined:
    Dec 12, 2013
    Posts:
    80
    Hi again lod3,

    The case you are describing happens because there is one or more states that has quite loose stiffness set for its spring for that weapon.
    To fix it , you would need to tweak the position spring and rotation spring's stiffness and dampening for the different states.
    Worst case go to all the states for that weapon and set the position spring and rotation spring's stiffness and dampening to the same values as in the default state.
    Alternatively you could experiment with hierarchy of the states.

    Hope this helps!
    Andy
    VisionPunk
     
  38. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    Thanks for the info, Andy_.

    Having already experimented with tweaking the springs, I'm curious if there is any documentation on each variable in the States *.txt files. The manual documents the parameters of the internal scripts fine, but I've not found anything that explains what each specific item in these States files do, and what exactly their values affect.

    Moreover, I have a feeling some of these parameters are dependent on other parameters from different files being enabled (or at a specific value), and that information would also be extremely valuable in terms of understanding what each element does in a State.

    I've done some of my own trial and error debugging to figure out what each parameter does, but it's a slow and tedious process. Is this info available anywhere?


     
  39. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    In "Vital / Spawning" tab
    Animation / Sound has a bug
    I have another question, when I put my characters, with animations everything works, but when hit a shot
    It hangs in a loop

    would be nice if the AI also go up stairs

    another bug was that the shots hit anywhere even from far away
     
    Last edited: Feb 27, 2014
  40. Caesar15

    Caesar15

    Joined:
    Jan 8, 2014
    Posts:
    16
    Quick question for anyone who knows, can I add my own custom gun to this? Or at least a model. The game I am trying to make involved muskets, and well, the defualt weapons are not muskets as you can see. So I am wondering if it's possible to add my own custom gun or at least take a gun and replace the model and tweak the values.
     
  41. StonePaleAle

    StonePaleAle

    Joined:
    Aug 20, 2012
    Posts:
    28
    Yes. It is very easy to add your own weapon. There is a walk through in the docs on how to accomplish this.
     
  42. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    It is not only possible, it is encouraged! We get to point and laugh if everything turns to mush as you attempt it! .... Seriously though, go back to about page 141 on this forum, for a link to a video that shows one way to proceed, or go take a look at the stuff that @redhawk posted on the "Offical" forum. Here's one link: http://visionpunk.vanillaforums.com/discussion/709/adding-a-ranged-weapon/p1
    You know, that forum searches so nicely compared to this ... I don't really understand why this "thing" is still alive ... unless one wants to read 150 pages of search results. ... bah! Consolidate this stuff! The knowledge base would be so much better if it were centralized in one location ... one nicely searchable location. Sorry, didn't mean to get off of my meds there ...
     
  43. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    So, you mean that when your AI get's shot that it repeats it's damage animation? Is that it? Check this ... http://visionpunk.vanillaforums.com/discussion/comment/2062/#Comment_2062
    and this ...
    http://visionpunk.vanillaforums.com/discussion/comment/1871/#Comment_1871
    and remember that this is BETA stuff... many things should be fixed in the next couple of weeks in the new release. (early March at last report.)


    The AI will climb stairs. You'll probably need to place an invisible ramp, and also make sure that the angle doesn't exceed their settings and that the grid is laid out properly. They climb hills (in the demo scene!) , for example, so there is no reason that they can't climb "stairs".

    The problem with hitscan bullets is that they arrive instantly. It would probably be better to have some type of percentage of hit probability, based upon distance ... or even a percentage of Damage message that is sent to the player. It could still be randomized based upon distance. And again, the business of shooting through walls, etc., is well know and should not be thought of as a bug! It is a feature!
     
    Last edited: Feb 27, 2014
  44. Caesar15

    Caesar15

    Joined:
    Jan 8, 2014
    Posts:
    16
    Thanks!

    Thank you, will definetly be buying this pack. True, would be easier if it would be possible to search through all this material.
     
  45. GameDev_John

    GameDev_John

    Joined:
    May 28, 2012
    Posts:
    19
    Hey, I had a question, Working on a cinematic scene of sorts but I want the player to be able to look around, any ideas on making it where the player can't move their body but can use their mouse look?
     
  46. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    The Action-Hero part of one of the demo scenes might be a place to start to see how VP handled camera work for that demo.

    For the paralysis of your player, creating a new state (or even just a Boolean, if one is not inclined to use the event system) would allow you to conditionally enable or disable WSAD while not affecting your mouse look. Specifically, take a look in vp_Input in the InputMove routine, as that would be a convenient place to paralyze the player. You would also want to handle the crouch and jump, and maybe even the run states.
     
  47. StonePaleAle

    StonePaleAle

    Joined:
    Aug 20, 2012
    Posts:
    28

    Setting vp_FPInput.AllowGameplayInput to false should do the trick. It stops all movement input, but allows camera input.

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. /// <summary>
    6. /// Attach this script to the player
    7. /// </summary>
    8. public class TestCinematic : MonoBehaviour
    9. {
    10.     protected vp_FPInput m_FPInput;
    11.  
    12.     /// <summary>
    13.     /// If true, all input except the camera (mouse) will be diabled
    14.     /// </summary>
    15.     public bool SetPlayerForCinematic;
    16.  
    17.     void Awake ()
    18.     {
    19.         m_FPInput = GetComponent<vp_FPInput>();
    20.         SetPlayerForCinematic = false;
    21.     }
    22.    
    23.     void Update ()
    24.     {
    25.         if (m_FPInput != null)
    26.         {
    27.             // added for testing - press K to test the results switching the public flag
    28.             if (Input.GetKeyDown(KeyCode.K))
    29.             {
    30.                 SetPlayerForCinematic = !SetPlayerForCinematic;
    31.             }
    32.  
    33.             // if the flag has been set, but the allow game play flag hasn't
    34.             if (SetPlayerForCinematic  m_FPInput.AllowGameplayInput)
    35.             {
    36.                 // don't allow movement
    37.                 m_FPInput.AllowGameplayInput = false;
    38.                 Debug.Log("Movement is NOT allowed");
    39.             }
    40.  
    41.             // if the flag has been reset, but we are still not allowing movement
    42.             if (!SetPlayerForCinematic  !m_FPInput.AllowGameplayInput)
    43.             {
    44.                 // allow movement once again
    45.                 m_FPInput.AllowGameplayInput = true;
    46.                 Debug.Log("Movement is allowed");
    47.             }
    48.         }
    49.     }
    50. }
    51.  
    52.  
     
  48. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    @StonePaleAle, Great little script! Perfect! No bumping around in vp_Input or anything! Handles all of the use cases perfectly. Excellent! (I had been down at the pub! ha!!)
     
  49. Andy_

    Andy_

    Joined:
    Dec 12, 2013
    Posts:
    80
    Info about those should be either in the manual or in the code (check the top declarations of vp_FPController, vp_FPCamera, vp_FPWeapon, vp_FPWeaponShooter
     
  50. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    Edit: Problem solved (via SpectralRook).

     
    Last edited: Mar 2, 2014
Thread Status:
Not open for further replies.