Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UFPS : Ultimate FPS [ RELEASED ]

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

Thread Status:
Not open for further replies.
  1. KrayonZA

    KrayonZA

    Joined:
    Mar 5, 2013
    Posts:
    52
    I purchased it through the website not the asset store.
     
  2. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Ah. Sorry. I guess VisionPunk will send you a link to download the update. ;)
     
  3. daisySa

    daisySa

    Joined:
    Dec 29, 2011
    Posts:
    341
    Please ignore this, I got it working using your tips here.
     
  4. elektro1981

    elektro1981

    Joined:
    Oct 31, 2012
    Posts:
    1
    Hi,

    i have a small problem with UFPS 1.33 and playmaker.

    I am starting an animation of a game object when the character controller is entering a trigger. At the same time i would like to "force" the player to look at this animation in a "smooth way". As soon as the animation ends the player should get the control back.

    I tried to use the "iTween look to"-action, but the character controller (the standart UFPS prefab without the weapons) does nothing. By disabling the character- and cameracomponents before the "iTween look to"- action the camera is actually looking to the target object, but as soon as the character-components are reenabled the camera jumps back to the position before the look to-action was given - no smooth-transition :(

    I would appreciate any help!

    bye e

    (edit: or should i ask at the playmakerforums, because this is a playmaker-specific problem?)

    solved: i had to save the original coordinates of the camera, so its possible to rotate back to them. i just an empty gameobject for that. its not perfect, but for somebody who can not script a single line i am o.k. with the result :) )
     
    Last edited: Apr 6, 2013
  5. clinton-reddie

    clinton-reddie

    Joined:
    Mar 20, 2013
    Posts:
    18
    Thanks for your reply. I've fixed this problem with your help, although all I did was search in FPS_player for 'input' and change 'E' to 'V'. I thought this would be the fix, although I didn't know where to look until you pointed me in the right direction.
     
  6. Eqric

    Eqric

    Joined:
    Jun 29, 2012
    Posts:
    51
    Nvm i found the solution.
    I just changed row 34 in vp_StateEventHandler.cs to:
    foreach (vp_Component c in transform.root.FindChild("AdvancedPlayer").transform.GetComponents<vp_Component>())

     
  7. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Just want to say that I've downloaded 1.4 and it is much easier to work with. Congratulations.
     
  8. TryHarder

    TryHarder

    Joined:
    Jan 1, 2013
    Posts:
    121
    +1 Much easier, loving it !
     
  9. mfcw

    mfcw

    Joined:
    Jan 20, 2013
    Posts:
    3
    Hi VisionPunk, thanks for the great asset, it's really impressive and the great level of support was key to me purchasing this. I'm wondering if you could help with the below query.

    I bought v.1.33 a couple of weeks ago and just upgraded to 1.4 and have been playing around to get used to the system. I'm trying to edit various Vp_FPWeapon parameters in the preset text files, eg. the position spring offset in a weapon's 'Zoom' preset. In 1.33 this was as simple as duplicating and renaming an existing preset .txt file, tweaking values and assigning the .txt file to the weapon. I'm trying to do this in 1.4 but I'm getting the attached error pop-up:

    $ufpsc-weaponstates.jpg

    In case the image doesn't display, the pop-up reads: "Error: the file 'WeaponRevolverZoom ' does not contain a preset of type vp_FPSWeapon'.", and occurs when I try to drag a .txt file into a weapon's state preset slot under the Vp_FPWeapon component.

    I can't change the .txt file for any preset of any of the default weapons, or any weapons I add myself, in either the AdvancedPlayer or SimplePlayer prefabs. This is in a new project with 1.4 newly installed, and happens in both your Demo Scenes 1 3, and a new scene I created myself.

    I'm still familiarising myself with the asset so I'm hoping it's something simple I've overlooked. Any ideas?

    Thanks in advance.
     
  10. thelazyone

    thelazyone

    Joined:
    Mar 25, 2013
    Posts:
    3
    Sorry, looks like the Unity Assets Store doesn't want me to download the 1.4 package. I bought the licence 2 weeks ago, and now i'm dying to try this new version! =(
     
  11. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    what you can do is delete the preset you are trying to replace and then re-add it and then it will work. I got that same error, must be referencing something from the old vp_FPS* classes, not sure though, but doing this does work.
     
  12. mfcw

    mfcw

    Joined:
    Jan 20, 2013
    Posts:
    3
    Thanks phato777, deleting and re-adding the state works.
     
  13. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Has anyone had any luck getting the latest version of UFPSC and UniSky to work properly? I've spent over an hour trying to get it to work but with no luck and yes, I've read the FAQ and what it suggests.

    Any help would be appreciated.
     
  14. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    Is unisky the same as unistorm? I've gotten unistorm to work with 1.33 and 1.4. If they aren't the same or made by the same dev than disregard. If they are, what is the issue you're running into?
     
  15. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Yeah, my bad, I meant UniStorm! Well for starters, the sky slowing turns into the atmosphere orb that you see in the editor and the rain splashes on the ground but doesn't create the rain streak particles. Would you be able to help me?
     
  16. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    You need to change the Far Clip Distance on the main camera to 15000. That should fix most of the major problems... if you look further back in the thread there is some more advice for fixing smaller problems.
     
  17. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Yeah I did the Far Clip distance and all the steps from the post that the FAQ links to but it still won't work. Thanks though.
     
  18. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    I've spent all day trying to get this to work! Everything is working except for rain. Someone please help haha
     
    Last edited: Apr 8, 2013
  19. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi guys,

    Very sorry for zoning out there for a bit. I had to do a 23 hour shift last week with the release of v1.4 and show up for a new job the the next day. So I was really knocked out this weekend and had to go offline for a couple of days. Anyways, back now - guns blazing ;). I plan to spend this week mainly improving the manual for 1.4.
     
  20. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hmm, it seems you have discovered a limitation in the shooter class. Though multiple projectiles are supported, it seems multiple shells are not. I suggest having a look at the "Fire" method of the (v1.33) vp_FPSShooter.cs, specifically the loop after "// spawn projectiles", and imitate that approach for where objects are instantiated in the "EjectShell" method.
     
  21. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Glad to hear it :). Love your gory screenshot BTW.
     
  22. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Ah, I see. Ok good you got it working. Actually nothing has been designed for having the controller childed so there may be further bugs related to that. Please let me know if you run into other issues.
     
  23. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Sorry, Unity decides when assets go on sale and I currently have no info on the date of the next sale.
     
  24. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi, I have updated the FAQ, with instructions on how to upgrade for purchases made using both methods.
     
  25. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Ok great =)
     
  26. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi elektro1981, To "steal control" from the player and fix the camera on one or several look points, you may want to have a look at the demo for v1.4 (see link in my signature). I do stuff like that in the second (physics demo) scene. In that scene, I have an array with look positions and a method "SmoothLookAt" which is called every frame to interpolate towards the current look point. For the source you will have to update to 1.4 though. Regarding interpolating smoothly between iTween and UFPS, that's something I've never tried and don't really have a quick answer for.

    Impressive! I guess that's the way to go then :)
     
  27. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    *Phew* I'm relieved to hear that. Was afraid it was going to be way harder. Thanks again for all your help.
     
  28. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    It's unfortunately harder for me but I know it's better :) I still have no idea how to create my own weapons anymore :p

    And do you see my post about UniStorm? Sorry to be a bother.
     
  29. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi mfcw. Glad you like it! I can see from further posts that you have solved this issue. Just want to add that if you want to re-use presets from 1.33, keep in mind that the component names have changed. The preset system is designed to show an error dialog just like the one from your screenshot if the component script name is unknown (and "vp_FPSWeapon" should be unknown if you have deleted the v1.33 scripts as recommended).

    Also, if you want to use presets from v1.33, you should know that angles and rotations now work differently (!). The reason for this change was that in v1.33, some angle properties wasn't returning values corresponding to the actual angle reported by the 3D engine, and no (future) scripting workflow should involve having to interchange or flip X/Y arguments. So in 1.4, X and Y have been flipped for the Angle property, and pitch has been inverted. If you have any hardcoded camera angles (for spawnpoints, teleports etc.) depending on your code the X and Y arguments may need to be interchanged for the angle to be set correctly.

    So, to update your custom v1.33 presets to v1.4:

    1. Remove the "S" from the class name in the script's "ComponentType" argument. For example:
      In the preset text file, vp_FPSCamera should be changed into vp_FPCamera.

    2. The X and Y arguments of the following parameters should be swapped:

      vp_FPSCamera
      PitchLimit
      ShakeAmp​
      vp_FPSWeapon
      LookSway
      BobRate
      BobAmplitude​
    Note that all the presets shipped with v1.4 have been updated already, so this would only pertain to your own custom made v1.33 presets, or demo/standard ones that you have modified from v1.33.

    All this information will be added to the FAQ soon.
     
    Last edited: Apr 8, 2013
  30. Brocan

    Brocan

    Joined:
    Mar 22, 2012
    Posts:
    45
    First of all, thanks for your impressive work! this package is amazing!

    My question is that if you are planning to implement full body awareness in next releases :D

    Thanks in advance!!
     
  31. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    I think I'm invisible :eek:
     
  32. KrayonZA

    KrayonZA

    Joined:
    Mar 5, 2013
    Posts:
    52
    Thanks!
     
  33. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    By no means, TheRealFuzz, I'm writing to you as we speak.... hold on a few minutes. Sorry to keep you waiting..
     
  34. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    As am I :)
     
  35. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    The way I have unistorm setup is to have the CloudParent follow my player all the time. Surprisingly this works as I only move the position. I have made the CloudParent half the size it was originally so I can pull in the FarClipPlane on the camera, otherwise SSAO looks horrible :/

    I have my player dynamically positioned on game start. The Unistorm particles are all in a GO named Particles (original, I know) and on game start I parent them to the player after I instantiate my player (check screenshot for hierarchy, PC is equivalent to the root of a UFPSC Prefab, with the vp_FPController on it).

    $Screenshot_4_8_13_9_24_AM.png

    I've repositioned some of the particles as well to fit my particular setup. RainSystem, SnowSystem and Windy Leaves are set to

    transform.position = new Vector3(0,10,0);

    My players height is 3. As you can see in the screenshot, I'm able to see the rain streaks just fine.

    $Fullscreen_4_8_13_9_04_AM.jpg

    Is there any other questions you have that I could answer to be a little more specific?
     
    Last edited: Apr 8, 2013
  36. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Ok, I'm sorry this is confusing. I've have taken an in-depth look at this to see where it may work differently from before. Turns out you can actually create weapons in a few different ways:

    Legacy way - from scratch (v1.33, no longer recommended but confirmed to work fine in 1.4)
    1. Create an empty gameobject.
    2. Add a mesh filter and a Mesh renderer.
    3. Drag your mesh to the mesh filter.
    4. Drag your gameobject onto the main camera object so that it becomes a child of the camera.
    5. Add a vp_FPSWeapon component (1.33) or a vp_FPWeapon component (v1.4) to your weapon gameobject.
    6. Make sure the position of the weapon gameobject under the camera is 0, 0, 0.
    7. Start the game, open the weapon's Position foldout and adjust the Z position until you see the weapon.
    8. When happy with the position, save the weapon Preset.
    9. Stop the game and load your weapon preset script onto the component.
    10. Add a shooter component if it's a firearm. For more info about the shooter component, see the manual.

    Note that in this way, you are likely to get bad art pipeline headaches if you ever decide to use models with traditional animation further down the line.

    New way (strongly recommended in v1.4, won't work in v1.33)

    Step 1. Create a weapon prefab (for rendering)
    1. Create an empty gameobject.
    2. Add a mesh filter and a Mesh renderer.
    3. Drag your mesh to the mesh filter.
    4. Make sure the world position of the weapon gameobject is 0, 0, 0.
    5. Name your gameobject and drag it to the Project view to make it into a prefab (preferably drag it into the "Prefabs" folder)
    6. Delete the weapon gameobject from the scene and forget about the prefab for now.
    Step 2. Create a weapon object (for functionality)
    1. Create a new empty gameobject. Name it like you named the weapon prefab, perhaps prefixing the name with a number to be able control the order of the weapons more easily later.
    2. Add a vp_FPWeapon component to your weapon gameobject.
    3. Open the weapon component's Rendering foldout, and drag the weapon prefab you created earlier into the slot.
    4. Drag the weapon (functionality) gameobject onto onto the main camera object so that it becomes a child of the camera.
    5. Start the game and adjust position etc. just like in the "legacy" way (above)

    Which brings me to the 3rd way of getting a weapon into the game.

    Modify an existing weapon
    1. Drag an example player prefab into the scene (SimplePlayer or AdvancedPlayer).
    2. Duplicate an existing weapon from under the fps camera (right click -> Duplicate) . Rename it.
    3. Find the vp_FPWeapon component on the duplicated weapon and open its "Rendering" foldout.
    4. Now, if you have a weapon prefab done it's easy: just drag your prefab into the Prefab slot.
    5. Otherwise, you can click on the weapon prefab to reveal its location in the hierarchy.
    6. Duplicate the source prefab, and expand it.
    7. Find and select the "Mesh" node in the prefab.
    8. Drag your custom mesh onto the Mesh field of the Mesh filter component.
    9. Drag your new duplicated weapon model prefab into the Rendering -> Prefab slot of the vp_FPWeapon component.


    That's about it. I can see why you are confused since the structure has changed a bit and the documentation isn't up-to-date yet.

    But hope this helps! Let me know if there's anything else.
     
    Last edited: Apr 12, 2013
  37. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thx. Full body awareness is definitely on my wanted list! But first I'll have to tackle mobile ...
     
  38. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    Question. Does 1.4 cater to dual wielding weapons at all? I seem to remember reading something about that, but feel I was mistaken as I'm looking for someway to do it in the system with no luck. Seems it'll require some tweaking.
     
  39. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    No, not yet. It's a quite high prio though (along with moving platforms). My preliminary plan is to allow an unlimited number of weapons and make the CurrentWeapon variable in the weaponhandler into an array, if that makes sense. BTW, I PM:ed you (just in case you missed it) ..
     
  40. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    I did miss it. Got it now though and pm'd you back.
     
  41. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Thanks for getting back to me guys! I'm no programmer so I'm sure something will go wrong but I'll let you guys know how it goes.
     
  42. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    After using the previous version for nearly 4 months, this new stuff is making my head hurt. I guess I would call it "intimidated" as much as anything else. Just when I was getting really comfy, I have had to start climbing from the bottom of the hill again. I will feel much better, I think, when the docs are done ... maybe they will hold my hand a little as in the previous version. Sorry, but I needed to whine a little.:(
     
  43. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    I hear you. Sorry about that. Will work to make things easier moving forward.

    EDIT: Forgot to ask: what are the parts, specifically, that you find confusing? It's good to know when I'm iterating on the usability. Thanks.
     
    Last edited: Apr 10, 2013
  44. TryHarder

    TryHarder

    Joined:
    Jan 1, 2013
    Posts:
    121
    Stick with it, its like a new pair of shoes, they looked nice in the box but are a bit uncomfortable until you wear them a while, at which point you agree they are a lot better than the old pair !

    Definitely an improvement on something that was already very good, you'll master it !
     
  45. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I like the refactoring so far! Since you're rearranging things anyway, I figured I'd point out a few sticking points:

    1) Mouse Input. I see in the comments you mentioned moving the mouse code out of FPCamera and into FPInput, but make sure you also move the mouse code out of FPWeapon as well. Currently in order to disable the FPS controls to bring up a GUI, the steps I had to take are:
    - Set FPInput.AllowGameplayInput to false
    - Set FPInput.ForceCursor to true (shouldn't this be part of disabling AllowGameplayInput?)
    - Add a new var "handleInput" to FPCamera and set that to false to skip the mouselook code
    - Add a new static var "handleInput" to FPWeapon and set that to false to skip the weapon swaying code

    2) Layers. All the scripted switching around of layers on everything is annoying for anyone who already has specific layers set up in their game. Since you're expecting most people to use the prefabs anyway, I feel like it might be better to just set whatever layers you want on the prefabs rather than swapping around the layers by script in the Start methods of the components. I had to pull out all the layer code in both the original version and the new version to get it to work with my game and other plugins, and I just set the layers in the editor on the prefab itself instead.

    Other than those two things I'm really happy with the changes! I love the melee system; I had started implementing my own with the last version, but now you've finished the work for me. ;)
     
  46. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    Hmmm... I just did an override on the UpdateCursorLock method in the vp_FPInput class and modified this conditional statement

    Code (csharp):
    1.         if (ForceCursor || GameMaster.optionsMenu.IsGamePaused())
    2.         {
    3.             Screen.lockCursor = false;
    4.             return;
    5.         }
    6.  
    It's just checking my own pause handle class and if it's paused, lock the cursor. And then in the UpdatePause method, make sure it has the button you are using to pull up your menu. You can override this method as well.
     
  47. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Just setting ForceCursor only makes the cursor appear; moving it around still causes the view to move around and the weapon to sway, and the keys/joysticks still cause the player to move. It might not affect you if you are always pausing the game when the GUI is open (since the player isn't able to move anyway because it's paused) but in my case, I don't want to pause the game while the GUI's open.
     
  48. Many_Field

    Many_Field

    Joined:
    Sep 26, 2012
    Posts:
    9
    Hello,

    thank you for this wonderful package, you have a lot of talent.

    I recently tried to use an animated model but it is always shifted upwards. I have tried several methods but nothing works. Any idea?

    $Capture_01.PNG


    PS : Sorry for my english :)
     
  49. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    Ah ya, you'd have to go through more scripts if you don't freeze everything. I can see how a global shut off switch would be helpful for this type of thing.
     
  50. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    I'm confused as to what you mean. The Character Controller looks like that by default, I believe. It can make placement a little tough, though.
     
Thread Status:
Not open for further replies.