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

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hey, Moonlight. Good news! I have looked into timescale and pausing today and uncovered some of the issues that are causing these problems. The crash will be fixed in the next version, and arbitrary timescale (i.e. "Bullet Time") will be supported - if not in the next release - then in the one after that.

    Ok, this description is a bit vague but I'd be glad to look into it with a more detailed description of each issue (preferably with reproduction steps).

    Thanks

    /Cal
     
  2. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi jSoftApps. Photon networking won't make the next release unfortunately :/ It's a rather big feature and I'm not sure yet how much rewriting (if any) of the system it will require. I feel your pain though and I can PM you as soon as I know more (in a few weeks).

    /Cal
     
    Last edited: Nov 24, 2012
  3. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    Hey all,

    Just wanted to say that after all this time I have finally been able to adapt this asset to the unity default networking code. I had to set the FPSPlayer prefab as a child to a blank object that i just called Player, that way I could attach my third person prefab as a child along side the FPSPlayer. I then attached the movement scripts to this object "Player" so that both the first and third person children would follow the same movements and always be at the same location looking the same way. Then it was just a matter of disabling and enabling the right view and camera upon spawning using Awake() or Start().

    Of course, not everything is perfect. I managed to break a few features, but it should not take much to fix them.

    Thanks for a great asset!

    edit: should also say that i have not included any code for showing bullets across the network but that should be as simple as applying a network view somewhere then sending out an RPC.
     
    Last edited: Nov 24, 2012
  4. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Awesome!
     
  5. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    OK. Thanks VisionPunk! I'd be happy to wait a few releases for this code to by implemented. I am in no hurry to finish this game.
     
  6. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Any chance you could share the code that you used Silvers. I've been trying to do this for quite a long time
     
  7. YourSeedyUncle

    YourSeedyUncle

    Joined:
    Mar 27, 2012
    Posts:
    8
    This looks soo awesome :D
    Wow, why so cheap? You deserve a lot more for this...
     
    Last edited: Nov 25, 2012
  8. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Is there anyway to stop bullets from colliding with trigger only colliders? It's not appealing having bullets hit invisible objects. Also is there anyway to ignore bullet collisions for enemies?
     
  9. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    Is there a certain issue your running into? It is a bit too complex to post everything i did i feel because i had to write entire new scripts as well as modify some of the current scripts that comes with UFPS. I would gladly help with a specific issue though or maybe on how to get you started.
     
  10. Moonlight

    Moonlight

    Joined:
    Jun 7, 2010
    Posts:
    41
    Yeah, sorry it's a bit confusing, but the only thing that I did was import Unity Serializer, go to the serializer wizard, create a save game manager, click on FPSPlayer Prefab, store info for fpsplayer + children (to save everything), apply the demo pause script in the Unity Serializer folder to the save game manager, start the game and press "p" to pause and the errors show up right away.

    The way I tested the saving was by using the TestSerialization script instead of the pause script, and that's when I noticed some of the features or variables (such as which direction you are facing) weren't getting saved.

    Hopefully that is a little easier to understand, once again, this is a really amazing system, and I really would like to use it, but I don't understand it well enough to fix these problems myself (and trust me... I'm trying to figure it out)

    Could you tell me what part is causing the problems with timescale? After searching for a while it seems to be that you were dividing by zero causing the NaN error. I thought it was in the vp_FPSCamera script dealing with the EulerAngles, but I changed that to regular rotation values and everything works the same but I still get the error. I went back further and found the SetAngle() function, but after searching for a few hours, I could not find any script that referenced that function or set the angle property directly! I think it goes without saying that I have no idea how that script works. In particular, could you explain the SetAngle() function, because it seems nothing is using it, so is it even needed? Or am I missing something?



    EDIT: Another thing that you might look at (if you haven't already) is that when the player is running and trys to shoot, the animation (or just the movement i guess) is a little off and the muzzle flash seems to just appear without the gun behind it. I am sure this has something to do with the blending of the states and presets, but it still might be something you want to look at :)
     
    Last edited: Nov 25, 2012
  11. shaderx

    shaderx

    Joined:
    May 9, 2010
    Posts:
    65
    the vp_bullet script has the raycast function, you can add a layer to ignore ,however that script needs major editing to implement basic gameplay elements, such as having different bullet holes for different objects (metal, concret , flesh,wood),different impact effects on different objects(the current one would look silly on characters) so i hope visionpunk will look into that, and make it somehow customizable even though i guess UFPS wasn't made to be a complete fps solution instead just a very very good procedural animation system for fps games. so i think scripts like vp_bullet are just bonus we need to code our own.

    i also ran in the same issue as Moonlight , with states overlapping, i could hold shift without moving my character but the run animation would start , also i could hold shift zoom they would also overlap messing up the zoom animation, and the same thing with the muzzle flash showing up before the the gun is out of the run animation but this is only happening with customized presets.
     
  12. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi BHS. Thanks for visiting :). UniStorm looks awesome!
    The issue with bullets hitting triggers and enemy colliders is addressed in the next version. The solution is to ignore triggers upon raycasting (and ignore enemy colliders when placing the decal object) in "vp_Bullet.cs", based on layer / tag.

    Cheers

    /Cal
     
  13. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    I really just don't know how to get started. I think I can figure it it once I know how to start.
     
  14. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    I was wondering this as well. ETA on the next version?
     
  15. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thanks, I know :). The feature set has gotten big and more is coming. Price will actually go up from the next version onward.

    /Cal
     
  16. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi Moonlight. Ah, sorry I didn't get that you are using the Unity Serializer asset. I will have to get it and test it for myself at some point to find these issues.

    Sure. The problem is not with the SetAngle method, but with non numerical values (NaN) being fed to transforms. Have a look at how I solved a similar issue with movedirection in vp_FPSController.Update. One needs to check for NaN before setting motion or angle on a transform, or a NaN will crash Unity sooner or later. So this needs to be done in vp_FPSCamera.LateUpdate too, where rotation values are set on the two transforms, only with quaternions (xyzw) instead on Vector3 (xyz). Also, the mouselook method in vp_FPSCamera must return if timescale is zero, or the mouse smoothing buffer will be fed with zeroes and seize to function (you won't be able to rotate the camera after unpausing). That's the jist. You should be able to get rid of the pause crash with this info, but for slow motion / bullet time there are a whole range of tweaks to various classes needed for everything to work correctly. Way too much to be posted here.

    The method is obsolete (replaced by the angle property) and is no longer in use.

    Does this occur in the demo webplayer too? Or with your own setup? It's nothing I've noticed or have had reported before.

    -Cal
     
    Last edited: Nov 25, 2012
  17. VisionPunk

    VisionPunk

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

    Bullets hitting triggers, and decals getting stuck on enemy colliders will be addressed in the next version.

    Yeah this is exactly right. It's really a camera, controller and weapon animation system. Things outside of this scope (such as bullets, damage handler, decals and explosions) are examples designed to illustrate the basics of how to get started on these things.

    This sounds quite serious. If either of you could make a small, clean project for me where this occurs (just a scene with a floor and a broken FPSPlayer), zip it and email it to me I would be very grateful.

    Thanks

    /Cal
     
  18. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hey Sevenbits,

    I really dont' do deadlines, but if it was out within a week I'd be positively surprised. If it's not out by Christmas I'll bash myself in the head with a frying pan. So that's basically the release window ;)

    It's in a wrap up phase though. Just finished off some features today and am looking at a number of days of heavy bugfixing, cleanup, documentation and the build process...
     
  19. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Great. I look forward to seeing it.
     
  20. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    Hey,

    Thanks for your help. I've been trying for about a week, but can't get it to work. Thanks for your time and effort though.
     
  21. Moonlight

    Moonlight

    Joined:
    Jun 7, 2010
    Posts:
    41
    Serializer came with unity 4, at least for me, but maybe it wasn't supposed to? Are you using unity 4 currently, or still on 3.5? I can send you the unitypackage for troubleshooting if you want.


    Ok, that's good to know, so I can just delete it. I still cannot figure out where the Angle value is getting set though?

    I haven't really looked at the webplayer, but I am just using the simple default presets that come with the package. It just seems to be a blending issue between states. I like the fact that the player can shoot while running, the blending just doesn't work quite right with it.

    I can do that... I'll just give you the scene that I am currently working with. :)


    I would also like to ask... after purchasing, do future updates come free through the asset store? I don't really buy a lot of assets so I am not quite sure how it all works, lol.
     
    Last edited: Nov 26, 2012
  22. Eqric

    Eqric

    Joined:
    Jun 29, 2012
    Posts:
    51
    Could you tell us some new features in the upcoming version? :)
     
  23. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    http://www.gamertogamedeveloper.com/gtgd-series-1/video-4
    http://www.gamertogamedeveloper.com/gtgd-series-1/video-5

    These two tutorials basically allowed me really understand the basics about unity's network code. In fact, i still use the movement update script that these videos guide you through. Now the problem that these tutorials gave me is that they only include a third person character in the form of a capsule. While this does work, it actually is broken because the only reason the player does not see himself is that the camera is entirely inside the capsule. So from that point is when i created my own hierarchy for handling the player which is basically what i summed up in my other post. I made a blank object called player, then i put the entire FPSPlayer prefab from this asset as one child with a third person model as a second child at the same tier (right now just using the unity construction worker). At this point, the main two issues when dealing with multiplayer is handling what each player sees and controls. In both cases, its best to use the unity Awake() function in combinations with if(NetworkView.isMine == true) to determind which character belongs to who and what actions to take with the results (disabling the third or first person view, sending out RPCs, giving control etc). Hope this helps.
     
  24. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Thanks for the help Silvers! Could you possibly show a screenshot of the hierarchy pane for the FPS prefab? I guess I'm still a bit confused on what that would look like.
     
  25. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Ok, sorry I didn't know that serializer was now part of Unity :) I have Unity 4, so feel free to mail me the unitypackage. I'm very interested in fixing this issue, but disclaimer: it probably won't be fixed for the next build.

    Yeah this is very interesting. I think it may have something to do with scripts being loaded in the wrong order. You could try changing the execution order of the scripts in the editor.

    Thanks, that would be great !

    Each asset purchase is a lifetime license and you get to download all future updates for free.

    Cheers

    -Cal
     
  26. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    The update will focus on bugfixes and system improvements. There will be the new advanced sliding feature that I mentioned earlier, along with a number of new procedural weapon animation features aiming to push the quality of the motions into AAA territory. I will post the full feature list here when closer to the release.

    -Cal
     
  27. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,887
    Finally got round to buying this. Great stuff.
     
  28. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    http://i.imgur.com/YoG8i.png

    I went with paint instead lol. This is how i am going about it but I am sure there is a much more efficient way. Doing it this way, the third and first person are both tied to the same parent, thus applying any rotation to "Player" will rotate everything.

    Hope that helps
     
  29. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    I know you have a lot of people asking about this - not trying to nag.

    Do you think there will be an iOS option out by the end of the year?

    Thanks.
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks for the reply, but I have a couple more questions.

    Is there any way to have shadows cast on the fps models, such as on the arm and weapon? I see it working in the editor but when I test it in play mode it doesn't work. Also is there anyway to make the transitions for jumping more smooth? It almost seems like the character is teleporting up instead of jumping because it is happening so fast. I have adjusted the settings and read the docs, but still can't get it to match the falling speed

    Also any idea how I can get this working with UniStorm? I know you use multiple camera layers but we've done this in UniStorm to render the clouds and UniStorm still works for us. I have a lot of people trying to get it working on the UniStorm forum also so it would be beneficial for both of us to get it figured out.

    Thanks for the great system.

    Edit: I got UniStorm to work with the Ultimate FPS Camera for whoever wants to know.

    Go to the FPSCamera and set the far clipping plane to 15,000 and you will be able to see all objects for UniStorm, if you're using it. I should have known that since I'm the developer, but sometimes we overlook things that are easy to fix.
     
    Last edited: Nov 28, 2012
  31. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    OK Thanks! I saw that you had to use the

    if(NetworkView.isMine == true)

    Could you give me an example on where to use this inside the UFPS camera?
     
  32. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    first, let me say i made a typo, its actually if(networkView.isMine == true), so basically the n needs to be lower case. Anyhow, this is used an just about any script that you need to make personal to one player. Often if you do not have this you will see actions that happen to everyone instead of just the one player. Also, make sure the players have a network view component attached to them, that is quite important =). Just as an example, this is my code i use for enabling/disabling the first or third person view depending on who is looking at the object.

    Basically it just says if the object this is attached to is me, then disable the third person model, but if it is not me/mine then disable the first person view.

    edit: Updated the code with the unity 4 way of deactivating game objects
     
    Last edited: Nov 28, 2012
  33. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi ShinyTaco. It's ok :). I will be prioritizing this given the amount of people that have contacted me about it. I'll try to begin work on it before the end of the year that's for sure. No idea when it will be done to be perfectly honest. Depends on the unknown amount of issues that will pop up. But it will have to fit inside some meaningful release cycle (should take weeks, not months).
     
  34. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Yeah, check out this discussion:
    http://forum.unity3d.com/threads/12...era-RELEASED?p=1006553&viewfull=1#post1006553

    See this post for a discussion on how to make a soft upward jump force:
    http://forum.unity3d.com/threads/12...era-RELEASED?p=1050184&viewfull=1#post1050184

    Also, the next version of the asset will feature soft fall impact forces on the weapons, modeled over a number of frames.

    That's awesome. Thanks for looking into this! Sorry I didn't beat you to it.. Anything else you need help with don't hesitate to PM or email me.

    Yeah, been there ;)

    -Cal
     
  35. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hey Silvers,

    Big thanks for helping out answering these questions.

    -Cal
     
  36. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25

    Hey no problem! Figured there will be others down the line who may need the same help I was looking for. Plus, it is helping me verify what I did and why I did it lol.
     
  37. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Again, thank you for all of your help. I just have more few more things I need clarified. Does that third person section you mentioned have any scripts attached to it? If so, what scripts are?
     
  38. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    I guess what I'm trying to say is, which scripts go where?
     
  39. Moonlight

    Moonlight

    Joined:
    Jun 7, 2010
    Posts:
    41
    Hey, Vision/Cal, If you check your PM's I sent you a link to the project I was working with. Hopefully you will get the same results that I did with the blending of the states and know how to fix it, lol. Anyway, thanks for the help!
     
  40. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Yeah just noticed! Great. I'll get back to you within a couple of days when I've had a chance to look at this in-depth.

    Thanks ...

    -Cal
     
  41. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    As of right now, i dont have any on it, but it would be all your scripts that would handle anything dealing with the third person character such as animations and displaying different weapons. Basically any scripts that would effect the first person would be on FPSplayer, scripts that effect the third person would be on ThirdPerson, and scripts that would effect both go on Player
     
  42. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Thanks Silvers! I only have one major problem right now: there is no camera bobbing or movement. Do you know how to fix that?
     
  43. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Never mind! Fixed using:

    Controller = transform.parent.GetComponent<CharacterController>();
     
  44. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Only one problem remains: the third person mesh doesn't move with the first person one. Any idea on how to fix this Silvers?
     
  45. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    make sure the vp_fpscontroller is on Player and not FPSPlayer, that should do the trick i believe.
     
  46. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Well, I'm getting one glitch after another! Now, the player only moves in one direction when you push the w key. The player apparently doesn't turn when the camera turns. Any idea on how to fix that glitch?
     
  47. Silvers

    Silvers

    Joined:
    Oct 24, 2012
    Posts:
    25
    you have to then modify the rotation code to effect the parent grouping instead of just fpsplayer
     
  48. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    There is only one glitch left now. Here's a screenshot:
    http://www.jsoftapps.com/glitch.png

    EDIT: I guess the screenshot didn't work (stupid cloudflare) anyway, here's the description of my problem. All of the weapons how up in the player's hands once he spawns. Did you have that problem Silvers?

    EDIT #2:
    Here's the screenshot:
    $glitch.png
     
    Last edited: Dec 2, 2012
  49. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    OK. I give up. Nothing that I'm doing is working. Could you possibly send me your project files in a PM Silvers?
     
  50. Barove

    Barove

    Joined:
    Dec 2, 2012
    Posts:
    7
    guys, my audio listener is messed up, when i face the east sound completely stops, i have no idea why i havnt touched any scripts or codes. and plus i cant even find a audio listener component but maybe its in the scripts or something

    can anyone help

    Thanks
     
Thread Status:
Not open for further replies.