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. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    I still have this bug, i havent looked into how to solve it yet, so your now actually at the same point I am at. I do know that if you press the numbers it then only selects one. I have been working on other parts of my game atm since I plan to entirely rework the inventory system for my game anyhow so the code to select weapons is going to get scrapped.
     
  2. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    OK. It's good to know that I'm not the only one with that problem. One other bug that I have is that the players can't see each other -_-
    Did you have that bug? Here's the enable/disable script that I'm using

    Code (csharp):
    1.  
    2. #pragma strict
    3. var thirdPlayer : Transform;
    4. var firstPlayer : Transform;
    5.  
    6.  
    7. function Start () {
    8. firstPlayer = transform.FindChild("FPSPlayer");
    9. thirdPlayer = transform.FindChild("ThirdPerson");
    10. }
    11.  
    12. function Update () {
    13.  
    14.     if(networkView.isMine == true)
    15.     {
    16.         thirdPlayer = transform.FindChild("ThirdPerson");
    17.         thirdPlayer.gameObject.SetActive(false);
    18.         firstPlayer.gameObject.SetActive(true);
    19.     }
    20.  
    21.     else
    22.     {
    23.         firstPlayer = transform.FindChild("FPSPlayer");
    24.         firstPlayer.gameObject.SetActive(false);
    25.         thirdPlayer.gameObject.SetActive(true);
    26.     }
    27.  
    28. }
    29.  
     
  3. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi jSoftApps, Notice the error message at the bottom left of the screen. Click on the icon to open the console and see the full list of errors. BTW: This is explained in the manual chapter "Working in the editor".

    Anyway, When the console window opens you should be able to see a list of any and all errors. Please click on "Open Editor Log" (button at the top right of the console window). A text document should open. Please copy the text from this document and PM it to me and I'll have a look at it.

    Thanks

    -Cal
     
    Last edited: Dec 3, 2012
  4. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hey Silvers / jSoftApps, The "multiple weapons" bug is not actually a bug in itself. It's usually what happens if the system crashes before or during startup and the 'SetWeapon' method hasn't had a chance to run yet (and hide the unused weapons), either that or SetWepon itself crashes. Nine times out of ten when this happens there is a "NullReferenceException" error message in the console caused by some other code. See what it says and you'll be able to find the source of the problem. It could be your code, or mine (in which case I'm very interested in why it crashes :) ).

    -Cal
     
    Last edited: Dec 3, 2012
  5. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi Barove,
    This is very interesting. What version of Ultimate FPS Camera are you using? (Check out "ReleaseNotes.pdf" in the root to get the number of the release.) If it's lower than v1.33, please upgrade again from Asset Store.

    Are you using the system with any other assets or previous custom scenes / scripts? If so, please create a new project, import Ultimate FPS Camera into it, try starting the demo scenes without anything else in the project, and see if the problem persists. Depending on how this works, it may help to pinpoint the problem.

    BTW: The Audio Listener is added to the FPSCamera component and created automatically on startup.

    Hope any of this helps and send me a PM if not...

    Cheers

    -Cal
     
  6. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    I may have at some point, not really sure. I would let the objects themselves start enabled then only run code to disable them inside that if statement. It may do the trick.
     
  7. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    good call, there is a NullReferenceExpection pulling up this function inside vp_FPSWeapon

    Code (csharp):
    1.     public void SetPivotVisible(bool visible)
    2.     {
    3.         m_Pivot.gameObject.active = visible;
    4.     }
     
  8. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Could you possible show me the full script that you sued for this? I guess I'm kinda confused.
     
  9. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
  10. Moonlight

    Moonlight

    Joined:
    Jun 7, 2010
    Posts:
    41
    You mean "used" not "sued", right? Just checking because I'm confused now, lol.
     
  11. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    lol. I didn't catch that :D
     
  12. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    That cold be the problem. I'll look into that.
     
  13. dev909

    dev909

    Joined:
    Dec 5, 2012
    Posts:
    1
    Hey I just bought ultimate fps ! :D

    Quick question though. After I set up the player object, and fps camera/weapon object (the getting started from scratch section in the documentation) I have problems with my weapon (in my case a flashlight). I understand that the fpscamera and weaponobject are children of fpsplayer. So when I move my flashlight to get a better view on it from the camera, nothing happens. On the camera preview the flashlight appears to move (what I want), but when I press play, the flashlight just stays in the center of the screen. Any ideas/help?



    It may appear like its in the right spot, but the scale and stuff are way off from what I wanted.

    Thanks in advance.
     
  14. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Still not working Silvers. IDK why
     
  15. Moonlight

    Moonlight

    Joined:
    Jun 7, 2010
    Posts:
    41
    HAHA!!! If these were text messages, I think all of these "cold" go on smartphowned.com, haha.
     
  16. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    With the new update do you plan on adding support for GUI texts and GUI images? Not having them available to use with your system is hard to work around.
     
  17. Neoshiftr

    Neoshiftr

    Joined:
    Dec 5, 2012
    Posts:
    67
    Anyone knows how to use this with the Standard Mobile Assets like the Touchpad and Joystick?
     
  18. VisionPunk

    VisionPunk

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

    The position, field of view and rotation of the weapon model (in this case your flashlight) are governed by your vp_FPSWeapon component at runtime. So locate your weapon component in the Inspector, open the "Rendering", "Position" and "Rotation" foldouts and modify the FOV, position and rotation from there. When satisfied, save the preset (far bottom of the component) and assign the preset file to a state or just load it onto the component when the game is not playing to update it in the Inspector. See the chapters on presets and states in the manual to learn more about the workflow.

    Hope this helps!

    -Cal
     
  19. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi BHS, It won't make it into this update I'm afraid. But once it's out the door I can help you look into it. Had no idea this was broken. Thanks for bringing it to my attention.

    Cheers

    -Cal
     
  20. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi ITGeist,
    Here's a summary of all mobile related discussions on this thread:
    http://forum.unity3d.com/threads/12...era-RELEASED?p=1085370&viewfull=1#post1085370

    Also, I had a customer ask me about integrating the standard Joystick example. He was confused regarding the fact that the example script uses GUITextures, which require a GUILayer component to render. I.e. in order for it to draw the GUI, you must add a GUILayer component to your FPSCamera and it should work.

    @BHS: Could this possibly be the issue with gui texts / images aswell?

    Hope this helps!

    -Cal
     
  21. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    I just bought this, it looks excellent!

    At the moment I'm working on a racing game with weapons. I'd like to use your shooting system and add it to the cars, would this work? Everything seems pretty modular.
     
  22. Wrekk

    Wrekk

    Joined:
    Jul 16, 2012
    Posts:
    51
    Hello. For some reason I can't add image effects to the FPSCamera object (well I can, but they're not working), but when I add them to the WeaponCamera obejct they work, but not as they should. For example, my Sun Shafts are reversed (I can send you a screenshot if you want). Any idea how to fix this?
     
  23. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    I'm about to give up on this and try to make a fps cam myself. Sorry VisionPunk, but if I can't get this to work soon, I may have to stop using your camera script :(
     
  24. MrBananaDragon

    MrBananaDragon

    Joined:
    Jul 22, 2012
    Posts:
    16
    Hey Cal, I've been working on a weapon selection system, that uses chosen variables (through GUI), then instantiates an empty Player prefab with no weapons, then instantiates the chosen weapons. My problem is, when I spawn the weapons, they don't work as "weapons". They simply spawn on top of each other, and they act as normal objects. If you could help me, that would be great.
     
  25. VisionPunk

    VisionPunk

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

    Thanks for buying!
    I think the Bullet, Explosion, and DamageHandler classes should work for pretty much any action game. Regarding using the weapons in a mounted fashion, check out the presets for the turret example in the demo to learn how to limit the rotation of the camera. It shouldn't be very hard to lock the FPSController in place on the cars. The following post has some info regarding disabling collision on the controller, disabling gravity, forcing position and angle on the controller + camera, and more:
    http://forum.unity3d.com/threads/12...era-RELEASED?p=1051813&viewfull=1#post1051813

    Hope this helps.

    -Cal
     
    Last edited: Dec 7, 2012
  26. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi Wrekk,
    Have you had a look at the Image Effects chapter in the manual (page 57). It expains how to use UFPS with image effects (including sun shafts).
     
  27. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi jSoftApps,
    Sorry you are having so much trouble with this. What can I say .. UFPS is currently a camera and weapons system and has no built in support for networking. As you know I'm planning to add Photon support in the coming months. That's all I can tell you right now.

    No problem. I understand completely.
     
  28. LeakySink

    LeakySink

    Joined:
    Apr 9, 2012
    Posts:
    141
    Bought the package a while ago, any news on getting it working with moving platforms? I've written something to do it myself but without much success.
     
  29. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    572
    Hi VisionPunk,
    I'm working on the pause screen, I have a couple of button but I do not know how to stop the camera follow the mause and why does my button do not get mouse down.

    Thank you

    EDIT: Is there a way to add walking sound?
     
    Last edited: Dec 8, 2012
  30. bomberest0

    bomberest0

    Joined:
    Oct 7, 2012
    Posts:
    12
    How to make combo animation (Reload, Reload2, ... ) like at the pistol in the demo?
     
  31. VisionPunk

    VisionPunk

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

    Moving platforms hasn't been very eagerly requested, believe it or not, but it will definitely be added to the system. Not in the next release, though :/

    -Cal
     
  32. Fifth_Moon_Games

    Fifth_Moon_Games

    Joined:
    Dec 10, 2012
    Posts:
    3
    Love the camera. Great work.
    I know this has been asked before but I have been trying to get moving platforms to work with it. I have a platform moving and when the player touches it he becomes a child of the platform. This work by making the player move with the platform but I can't seem to get him to move while on it.(which I need to get him un-parented from it) I am not really asking for code, I just want to know if this sounds like the right direction or if I should be doing it another way like adding force equal to the platform or something else.
     
  33. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Pausing the game is usually done by modifying timescale, which is unfortunately broken in the current version of the system. I'm working on a solid fix right now and it will be included in the next version.

    Yeah, with a little scripting it's fairly easy. You could call a method from "vp_FPSPlayer.Update()", for example "DoMoveSound" and detect the player speed using the syntax explained in the "Update()" comments.

    When it comes to playing footstep sounds, just use a list of sounds and play them randomly. This can be done just like in the vp_Bullet class. Study its "Start()" method to see how random sounds are played there from a list upon bullet impact.

    Hope this helps

    -Cal
     
  34. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi Andrew, Have a look at the method 'DoExamplePistolReloadSequence' at the bottom of 'vp_FPSDemo2.cs'. It should be fairly explanatory.

    -Cal
     
  35. VisionPunk

    VisionPunk

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

    I don't really know what's the best approach here. Will have to look into it. Surprisingly, the platform feature is one of the least requested features, but you're the second person to request it this week :). I am planning to add it ofcourse. Can't really say when though. As someone mentioned the example Unity FPS controller has this feature. Don't remember how complicated that implementation was off the top of my head but you could probably lift principles and / or code from there.

    Good luck

    -Cal
     
    Last edited: Dec 10, 2012
  36. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I'm using UnitySerializer and have got a saving system working with your system. The only problem is that the pivot point materials are rendering so you can see them while playing. This only seems to happen after I load the game. Is there anyway to remove the material or make it 0 alpha? It's instanced at runtime so I'm not sure how to access it. This only happens on the weaponless weapon number. Maybe I deleted or removed something I shouldn't have?

    Also is there anyway to disable the hide cursor? I need to access a menu system when I press p.

    $PivotUFPSC.png
     
    Last edited: Dec 11, 2012
  37. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi BHS, Have a look at the method that sets up the pivot in vp_FPSWeapon (Start or Awake I think). It gets assigned a sphere primitive. You should be able to just not assign it, or to disable its renderer.

    I have simplified this in the upcoming version, but here's my standard answer to that question :)
    What you need is the "LockCursor" property of vp_FPSPlayer. You can study how this works in "vp_FPSDemo2.cs -> Update".

    Code (csharp):
    1. if (Input.GetKeyUp(KeyCode.Return) || Input.GetKeyUp(KeyCode.KeypadEnter))
    2.     m_Player.LockCursor = !m_Player.LockCursor;
    3.  
    Cheers

    Cal
     
  38. Ted-Brown

    Ted-Brown

    Joined:
    Oct 16, 2012
    Posts:
    33
    Where is AmmoMaxCount stored for each weapon?

    I checked the Shooter presets for the weapons provided, but there's nothing mentioning Ammo! :( ???

    And if someone could tell me how the FPSCamera knows which weapons to spawn, I'd be in your debt. =)
     
  39. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Loving that screenshot. Unpublished project?
     
  40. VisionPunk

    VisionPunk

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

    In fact, AmmoMaxCount is missing in the current presets. It works anyway because the value is set in the player prefabs. Simply set the desired value in the shooter component in the inspector. Then save the preset and the AmmoMaxCount variable will be present in the script. You can ofcourse also add the value manually to the text file like so:
    Code (csharp):
    1. AmmoMaxCount 20
    As for your second question, please consult the manual, page 9 10.
     
  41. J-F

    J-F

    Joined:
    Nov 8, 2012
    Posts:
    101
    I don't know if im doing this right but when i want to make a firing animation i use a separate script, This causes the weapon do the animation even when dryfire. Can anyone help please?
     
  42. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi,

    Here's a brief update about the next version of Ultimate FPS Camera, v1.4.
    The main focus in this build has been further extending the weapon motion feature set for motion on par with the latest AAA games.

    These are the features that I can confirm:
    • Integrated support for traditional animation on weapons, e.g. fire, reload, wield, along with a system for scheduling ambience / idle animations at random intervals.
    • Full slowmotion (a.k.a. Bullet Time) support for all the FPS classes + numeous framerate independence fixes and helper methods. This might seem like an easy thing to do in Unity but was actually a major challenge because of the way UFPS uses procedural and not interpolated motions. But it's awesome in action =).
    • An advanced slope sliding feature, allowing the player to slide at fixed speed, or with an accumulating slide speed for out-of-control sliding. Also, fixes to prevent jumping up steep surfaces. Sliding motion is propagated to the camera and weapons which looks really cool.
    • A weapon footstep motion system for increased realism of walking and running motions.
    • A new pivot rotation spring for the weapon, allowing rotations that were previously not possible.
    • Smooth forces can now be added to springs: an impact can be modeled over several frames.
    • A new example scene with scripting examples for creating different kinds of item pickups and powerups. Includes an example health and death implementation with a "death camera".
    • Bullet shell casings now inherit the speed of the character controller.
    • Angular recoil can now be added around the Z vector, with a dead zone and randomness. In short, this allows for cooler and more aggressive recoil motion.
    • Tons and tons of bugfixes.

    The not-so-good news is that bugfixing all of this has proven way more daunting than expected. That means I can't guarantee it's gonna be out this month, though I'm working very hard to get it out as soon as possible and at great quality.

    Take care

    Cal
     
    Last edited: Dec 15, 2012
  43. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    I have great news visionpunk! I almost have successfully gotten UFPS to work with the networking code! My only problem that needs to be fixed right now is that when one player pushes the move button, both players move.
     
  44. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Fixed that problem and guess what? I ran into another. Here's a screenshot of the error VisionPunk:
    $weaponerror.png
     
  45. VisionPunk

    VisionPunk

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

    Seems your screenshot is missing.
     
  46. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
  47. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Ok, please provide some more info about this issue.
    1. Are you using the latest version of Ultimate FPS Camera (v1.33) from the Asset Store?
    2. Does this happen with a clean install of the system (no modifications to the source)?
    3. Have you made any changes to the source code of the system? If changes are extensive, I will need you to zip your project and send it to me. (otherwise it's near impossible to figure out what's wrong). See the manual for contact info.
    4. But most importantly: please provide exact reproduction steps, otherwise it's very hard to find the problem. What exactly are the events leading up to this this issue appearing? Please read this article for a good example of writing reproduction steps: http://unity3d.com/BugReportingFAQ (except you should ofcourse report the issue to me instead of using the Unity bug reporter).

    Thanks

    Cal
     
    Last edited: Dec 16, 2012
  48. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    I am using the latest version of UFPS.
    I have modified the source quite a bit.
    It's too complicated to give you all of the steps that I used so I will send you my project in a zip folder.
     
  49. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    I believe that the email has been sent VisionPunk. The project is in the .7z format and is roughly 24 megabytes compressed. Check your spam folder if you can't find it. If you don't have 7-zip, you can get it for free at http://7-zip.org
     
    Last edited: Dec 16, 2012
  50. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    I've done a little bit of searching through the code and it seems that all the problems are occurring because of the pivot point
     
Thread Status:
Not open for further replies.