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

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    I just purchased this product, and I am not disappointed! Kudos to a wonderful system!
     
  2. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I just bought this and I'm using it with the Unity 4 beta. The demo scenes run flawlessly, but when I drag the FPSPlayer prefab into my own scene and hit play, it fails in the Awake function with the following error:

    Cannot change GameObject hierarchy while activating or deactivating the parent.
    UnityEngine.Transform:set_parent(Transform)
    vp_FPSWeapon:Awake() (at Assets/UltimateFPSCamera/vp_FPSWeapon.cs:122)
    UnityEngine.GameObject:SetActiveRecursively(Boolean)
    vp_FPSCamera:SetWeapon(Int32) (at Assets/UltimateFPSCamera/vp_FPSCamera.cs:1098)
    vp_FPSPlayer:Start() (at Assets/UltimateFPSCamera/vp_FPSPlayer.cs:94)

    The error message seems straightforward... basically saying you're not allowed to change the hierarchy like you are while it's being SetActiveRecursively from the parent. But it works fine in the demo scenes. Am I doing something wrong? Maybe this is a side effect of Unity 4's changes to the way Active is set on game objects?

    A little more info:

    I just tried opening the demo scene, disabling the FPSPlayer, and dragging in a new one, and it fails with the same errors. If I disable the new one and reactivate the old one, it's fine. I went back and forth between the two in the inspector with debug mode turned on and I can't see any difference. I even clicked Revert on the original and it still works fine, but Revert on the second doesn't do anything and causes it to still fail. Very strange.
     
    Last edited: Sep 12, 2012
  3. VisionPunk

    VisionPunk

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

    Thanks for highlighting this! Yeah it could definitely be an issue with the new Active methodology. Haven't gotten around to testing with Unity4 yet but it's getting closer so might aswell get started this week. I can't give you an answer before having looked deeper into it in a couple of days, but I'll get back to you (if you like, please email me any further findings).

    Thanks

    /Cal
     
  4. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hello rgrlee71,

    This is content driven; the decal is in fact just the geometry added to the bullet object. The bullet prefab has a vp_Bullet script on it. On impact, the bullet transform is instantly moved to the target. If the prefab has a renderer, the attached geometry will end up at the point of impact. It can be a decal mesh. It can also be a blob of slime or an arrow. If the bullet prefab has a renderer, it will be added to the decal manager and queued for deletion later. If not, the bullet will be removed shortly after impact. So if you're doing a mobile game or something else where decals might be wasteful, you can just remove the mesh filter and mesh renderer from the bullet object and you should be ok.

    Hope this helps, and glad you like the asset!

    /Cal
     
  5. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thanks SevenBits =)
     
  6. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Hey, you've earned it.
     
  7. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37

    Thank you!!!
     
  8. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Ultimate FPS Camera v1.32 is now available in the Asset Store. This is a small bugfix update. Also, some simple code comments have been added for demonstrating how to play conventional animations on the weapon in vp_FPSPlayer.cs.

    For the full list of changes, see the RELEASE NOTES

    Cheers

    /Cal
     
  9. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    +1
     
  10. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Is anyone else trying this with Unity 4? I'd like to know if anyone else has got it to work.
     
  11. Acelondoner

    Acelondoner

    Joined:
    Jul 27, 2012
    Posts:
    101
    I have two problems that I hope to get help with regarding this asset.

    1. Why is it that when I change some of the settings like bob,shake and zoom, it always reverts back to the default settings when playing the scene? I save the new settings and load them but it always goes back to default once I start moving.

    2. I have been trying to get Unistorm to work with this but when I tell unistorm to use FPSCamera, everything is a grey color. Also I get errors stating "object reference not set to an instance of an object". It works fine with any other camera but not the one above.

    Any ideas?
     
  12. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    The Unistorm thing is probably because image effects are funky with the overlapping FPSCamera and WeaponCamera. If you look at the end of the documentation, there's a section about whether each Image Effect should go on the FPSCamera or the WeaponCamera. Unfortunately I don't think there's an easy way to split Unistorm's image effect control between two different cameras.

    I am trying to figure out how to deal with it as well; I'm thinking I might just not use the WeaponCam at all, since I don't really mind the weapon poking through geometry when you run up to a wall; that's a fine tradeoff for having better postprocess effects IMO. I'm not sure yet how easy it will be to use the system without the weapon camera though.
     
  13. Acelondoner

    Acelondoner

    Joined:
    Jul 27, 2012
    Posts:
    101
    Are you referring to the image effects that come with Unity pro? I own the free version.
     
  14. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Yes, sorry. In that case, it might be because your FPSCamera's Far Clip distance is set too low. It needs to be set way up to like 10000 to see the skies properly.
     
  15. Acelondoner

    Acelondoner

    Joined:
    Jul 27, 2012
    Posts:
    101
    I already have it set to 15000. Hopefully VisionPunk may know why. Cheers for trying.
     
  16. gviddy

    gviddy

    Joined:
    Aug 1, 2012
    Posts:
    4
    just purchased...

    awesome asset and at an amazing price.. thanks so much!! :)
     
  17. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    I just purchased .... awesome tool!

    Features that could be nice to have in this tool:
    - Footsteps sound system
    - Ladder system
    - Add some non weapons tools like Binoculars , flashlight, hand with GPS/PDA or topographic sheet with map.
     
    Last edited: Sep 13, 2012
  18. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Just FYI; I got a response from Unity that they were able to replicate this bug and are looking into it, so hopefully it's something they will fix on their end. I've run into it in a few more places other than your plugin and was able to create a very simple repro.
     
  19. Unicron

    Unicron

    Joined:
    Sep 28, 2011
    Posts:
    191
    These can all be done by the developers using this asset. Non-weapons can be easily placed in, just follow the instructions about adding weapons in the documents.
     
  20. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    572
    Are you planning to add old style Doungeon Crawler movement?
     
  21. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Thanks Unicorn...I already made some tools with this nice system (Flashlight, hand with PDA ) ...my meaning is that could be a plus value to add these abilities by default to make this tool more interesting for non shooter developers (visualization..exploration...etc).;)
     
  22. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,887
    If we buy this, are all future upgrades free?
     
  23. Unicron

    Unicron

    Joined:
    Sep 28, 2011
    Posts:
    191
    Right, gotcha, but you can also use this kit to create non-shooter first person type games by not adding in any kind of weapons. :)

    The main feature of this kit is basically the camera and spring systems.
     
  24. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi Acelondoner, I just released v1.32 that addresses this issue. If you haven't already, please update and see if the problem persists.

    *If you could email me the full error log with line numbers that would be great. Like makeshiftwings said, if all else fails you could get rid of the weapon camera. I tested running the system without the weapon camera a while back and as I recall it worked fine. There may be some warnings / errors though. Let me know if you can't get it working and I'll help out. Drawbacks are: the weapon will stick through geometry and you won't be able to use a separate FOV for the weapon. However the weapon will work better with image effects, shadows etc. TIP: I used Torque game engine a few years back. They addressed the weapon clipping issue by raycasting in front of the weapon and moving back the weapon transform if you got close to geometry. This worked really well.

    Hope this got you somewhere..

    Cheers

    /Cal
     
  25. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Awesome, thanks for your effort.

    /Cal
     
  26. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Not at this time, sorry.
     
  27. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi sjm, Thanks for the suggestions. All good ideas.

    /Cal
     
  28. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi Fishman, Yeah; all future upgrades are free for any single product you buy in the Asset Store. Unless it's an addon released as a separate asset (for example, the RageTools asset requires RageSpline, but they are separate products).

    /Cal
     
  29. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37
    I was having this problem also and then I found out why. When you change one of the values in the inspector you have to hit the APPLY button in the upper right corner of the inspector. This applies the changes to the prefab and then the changes will stick. I almost pulled my hair out until I noticed that little button and decided to try it :)
     
  30. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Yeah, a lot of prefabs built with the Editor framework do that sadly. Nothing you can do about it.
     
  31. gviddy

    gviddy

    Joined:
    Aug 1, 2012
    Posts:
    4
    You have done some great work with this asset... its an awesome start for anyone wanting to make a FPS shooter...

    I see you get a lot of requests.. I think it is wise if you concentrate on system specific stuff and not go out of your way to make someone else's game... ;) couldnt ask for a better starting block than this system, and people should now learn how to add game play improvements themselves and create some great looking games with this asset as their base... :)
     
  32. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    572
    thank you, it's not a problem.
    Another question:
    Planning to add some take object animation, drop object and stuff like that?
     
  33. RSpy

    RSpy

    Joined:
    Sep 14, 2012
    Posts:
    2
    Hi here!

    Been using the package for a bit and I really enjoy it. It makes things fun! :) Best asset I have bought.

    Question about UpdateMouseLook in the VPSCamera class. It seems like it is not frame rate independent. So I have mouseX and Y being fed by Raw axis data of a game pad. Depending on my framerate it spins around faster(at higher fps). I tried taking m_Yaw and m_Pitch and multing them by timeDelta. If I start a spin around it seems close to same rate when I dip FPS but then if I stop turning then turn again while the FPS is lower the rate of camera movement is lower again.

    Any input on this issue?

    Thanks!
     
  34. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Show us the code you're using.
     
  35. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thanks! :)

    Yeah, it seems easy to forget that the asset is called "FPS Camera", but moving forward I will prioritize features relating to the camera and weapon aspects first and foremost.

    /Cal
     
  36. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    This has been requested before and may be considered in a future release. It would be fun to do! :) Can't say when though.

    /Cal
     
    Last edited: Sep 14, 2012
  37. VisionPunk

    VisionPunk

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

    I'm pleased to hear you like the asset. I'm less pleased to learn you're having problems with framerate independence ;). This is the first report I got regarding this but I'm sure there could be some flaw in UpdateMouseLook. My first idea would be to try and multiply the raw joypad data with delta time prior to feeding it into UpdateMouseLook (this is probably way off mark but it's worth a try).

    The last bit you wrote about (describing how the behavior changes depending on whether you are in the middle of a spin or if you start a new spin) has me thinking the values of the Unity Input Manager HERE and HERE could be involved somehow, but I haven't worked with gamepads in Unity before.

    Let me know how this progresses for you.

    Thanks

    /Cal
     
    Last edited: Sep 14, 2012
  38. gviddy

    gviddy

    Joined:
    Aug 1, 2012
    Posts:
    4
    Question:
    I am trying to get some GuiText and Controllers (ie mobile control textures) on the screen. A simple way is to just drag the Dual Joysticks prefab from the Unity Assets.. When i have a FPSPlayer though, the controllers and GuiText does not draw...

    Is there something I need to do to get the 2D stuff to draw when using the FPSPlayer camera ?
     
  39. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    How would one configure this to work with iPhone controls (ie duel joysticks) rather than the inbuilt mouselook?
     
  40. VisionPunk

    VisionPunk

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

    This is because the "Dual Joysticks" example uses GUITextures, which require a GUILayer component to render. Just add a GUILayer component to your FPSCamera and it should work.

    Cheers

    /Cal
     
  41. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
  42. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    So... I just heard back from Unity about this, and unfortunately they said it's intended behavior for Unity 4 and they don't plan on fixing it. So it looks like if you want to make your plugin compatible with Unity 4, you'll have to move all the code that creates child game objects out of Awake or OnEnable and into Start or Update. :/
     
  43. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Ok, big thanks for looking into this, makeshiftwings. I have made it a top priority.

    /Cal
     
  44. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Is it easy to make another weapon, with for exemple a 2 two hand wand with the provedural motion of Ultimate FPS ?
     
  45. VisionPunk

    VisionPunk

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

    Adding a new weapon model is very easy. Just drag a custom weapon model into the FPSCamera hierarchy in a couple of easy steps. It should work pretty much instantly.

    Currently the system is limited to one procedurally moving weapon model at a time. However, if you were to use a single model with both arms holding one (or two) weapon(s), that would be no problem. The arms could be individually moved by means of a regular Unity animation acting inside that one model.

    Also, the shooting class is separate from the weapon class so you can add more than one shooter under a single weapon to get i.e. a secondary firing mode such as a mounted grenade launcher. You can also easily attach your own shooter classes if you want custom effects and gameplay such as magical weapons.

    Cheers

    /Cal
     
    Last edited: Sep 22, 2012
  46. crockett

    crockett

    Joined:
    Apr 11, 2008
    Posts:
    264

    With that in mind, what are your future plans for this camera system? As in what sort of things are you working on or planning to add in the future? One thing I was wondering, is if you plan to add the ability to crouch walk lay prone/roll side to side. Most modern first person shooters have this ability, so it would be cool to have this option.

    If not, assuming I'm not much of a coder, how hard is it to change camera views, is it something I could maybe search through the code and add in adjustments easy enough?

    (sorry if it was discussed earlier but didn't want to read all 28 pages )
     
  47. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I would like to be able to freeze the camera/controller by right clicking (similar to Enter in the demo) and interact with an interface. I've gotten into the scripts some but there is a lot to go through. I thought I would start by asking here. Thank you!
     
  48. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    There's no roadmap at this point. See this post for more info.

    Crouch walking is supported out of the box (if I get you right and you mean "crouching and walking at the same time"). A prone state should be easily achievable by modifying the crouch presets and creating a prone state using the state system (it's actually very powerful: see the manual for in-depth info on presets and states). Roll side to side sounds a bit game specific for a generic FPS asset (see this post).

    The FPSCamera has a ton of options that can be tweaked in the inspector. See the manual for more info on this. If you want to pass control to a cutscene camera or a third person camera this might be a little more tricky but you should be able to do this by temporarily disabling the FPSPlayer.
     
    Last edited: Sep 24, 2012
  49. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hey topofsteel, What you need is the "LockCursor" property of vp_FPSPlayer. You can study how this works in "vp_FPSDemo2.cs -> Update".

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

    /Cal
     
  50. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Hi, I am just wondering, any plan to incorporate "Full Body Awareness" into the future version?



    "Full body awareness is a feature of first-person games in which players are able to see their entire body. This gives the player a better sense of immersion, as they can see their actual body and any arm and leg movement from a first-person perspective."

    http://www.giantbomb.com/full-body-awareness/92-1692/


    I would really like to see that happen - with the physics based rig.
     
    Last edited: Sep 24, 2012
Thread Status:
Not open for further replies.