Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview 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. Many_Field

    Many_Field

    Joined:
    Sep 26, 2012
    Posts:
    9
    This happens to me only with an imported model, it contains no controller there collider. Even with a base model if it is imported after having exported, really strange.
     
  2. RowleyBirkin

    RowleyBirkin

    Joined:
    Jul 4, 2012
    Posts:
    9
    Hey Calle,

    Grabbed this asset of the Unity Store the other day. First of all I'd like to say what a fantastic job you've done. Well worth $50 and was happy to pay full price rather than wait for a sale. Well done sir! Your hard work certainly is paying off.

    Just been trying to get my head around things. I absolutely loved your manual. Very well written and full of useful info. I would definitely appreciate even more hand holding though as I am an artist at heart! Things are juuust starting to make sense now, but any padding out of the manual you can do to make things even more simple for a simpleton such as myself would be greatly appreciated. Maybe even add a flow-chart or two so that we know at a glance the relationships between scripts and how/when each is sending messages or receiving events etc. As a new coder I am trying to use your code to lead me down a 'best practise' route so that I'd don't get into bad, hacky practises! I re-read the Event Handler tutorial in the manual many, many times. I still don't really 'get' it, I guess I just need more practise and maybe to be walked through a proper use case for each type of event. Maybe if you get time you could flesh out another couple of tutorial examples of events that are happening in the package at the moment maybe highlighting a use-case for each type of event. Just a suggestion! Any resources out there that you can recommend that helped in your understanding of events and delegates? You seem to have implemented them so well in your code! Modularity is the key, I guess I just need to get stuck in more and eventually I'll get it!

    I think I have found a bug in 1.4 to do with the preset system. When saving a full weapon preset or just a tweak (at runtime), first of all I have to close and re-open unity for the resultant text files to appear in my project view, otherwise I can't find them at all - they're just not there for some reason. Secondly it seems that the preset type is still being saved as vp_FPSWeapon rather than the newer vp_FPWeapon type. No problem I thought I'll just change the preset type manually to vp_FPWeapon in the .txt file. No dice, I get the following error when I try to add the new preset to the FPWeapon state.

    Error: The file 'WeaponMyShotgunZoom' does not contain a preset of type 'vp_FPSWeapon'

    Even if I leave the preset as type vp_FPSWeapon it won't attach and gives me the same error. At this point I tried to load the included preset 'WeaponMachineGunZoom' onto a state slot 'Zoom' that currently has the 'WeaponPistolZoom' preset on it in my scene. I get the a similar error pop-up message

    Error: The file 'WeaponMachineGunZoom' does not contain a preset of type 'vp_FPSWeapon'

    I tried searching in your code for a reference to the incorrect 'vp_FPSWeapon' that the message box error handler script may be looking at. To see if I could change it to vp_FPWeapon. I couldn't find it at all. I have pretty much exhausted my minuscule pool of knowledge and resources to find a fix for myself. Would be great of you could look into this.

    I am using unity 4.1.2 on osx.

    Keep up the excellent work sir.

    Edit: So to find the preset files I created I just needed to right click in the Project hierarchy and click refresh! Still can't attach my weapon presets though. Just tried camera presets I think they seem OK so far. Certainly saving out as vp_FPCamera types and I can attach different ones so that seems cool. Maybe this problem is just specific to the weapon presets!
     
    Last edited: Apr 11, 2013
  3. Many_Field

    Many_Field

    Joined:
    Sep 26, 2012
    Posts:
    9
    Hello

    I just get a different result when I place my model in a prefab home by removing its contents, my model is clearly visible and well placed, but then no animation running.

    If I use my model without the above manipulation, animations functioned but the pattern is shifted upwards. :confused:
     
  4. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    The problem seems to occur when you attempt to replace a preset on an existing rig. Try and delete that preset, then re-add it, and then drag your new preset in it. This seemed to work for me.
     
  5. RowleyBirkin

    RowleyBirkin

    Joined:
    Jul 4, 2012
    Posts:
    9
    Hey phato777,

    You're totally right, no idea why I didn't try that first before looking to find out what was going on in the code. Too eager to try to get my head around things I guess! Thanks so much.
     
  6. TryHarder

    TryHarder

    Joined:
    Jan 1, 2013
    Posts:
    121
    Hi,

    If anyone is interested after a year of learning Unity and prototyping so many ideas I have started the production of my game, the story is here:-

    Unity WIP Story

    or I have a blog running here:-

    http://www.thehadroneffect.com

    Its just for fun as the story tells, and as it features Ultimate FPS Camera as its weapon system i thought I'd let you know, just in case it was of any interest.

    Best Regards,

    $CL-86_2.jpg
     
  7. RowleyBirkin

    RowleyBirkin

    Joined:
    Jul 4, 2012
    Posts:
    9
    Hey TryHarder, your game looks like it is coming along very nicely indeed, I wish you all the best during it's development. I see you are a coder by trade and by your own admission have problems with the asset creation part. I am from the opposite camp in that I can create the assets in my sleep whilst coding is considerably harder for me to grasp. I am enjoying learning a new skill but my god does it seem like an ocean of vast unknowns to me at the moment!

    Thanks for your time,

    Rowley
     
    Last edited: Apr 12, 2013
  8. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    So as I expected, I failed at getting the rain and snow particles to show up with UFPSC and UniStorm. It said something along the lines that AdvancedPlayer didn't have a camera even though it has 2 as far as I know :(
     
  9. RowleyBirkin

    RowleyBirkin

    Joined:
    Jul 4, 2012
    Posts:
    9
    If any of you guys could chime in with a couple of hints or workflow practises to add unique functionality to weapons or simple player events without modifying any of the standard FPS Camera assets (so that my additions don't cause problems when an inevitable and awesome update comes along). I would be much obliged. Or have you guys been hacking away at the scripts and not worrying about updates down the line?

    I am at a bit of a loss as to how you can make non-destructive additions, to FPS Camera. With regard to states (page 46) v1.4 manual, says that to activate a state you need to add lines to the 'vp_FPPlayer'*script (this script no longer exists or has been renamed since 1.4 - is it now vp_FPInput?!) regardless - could you just create a script with it's own update function to activate the state? Or is it best to actually edit the vp_ script?
    After reading the official FAQ - this part in particular 'How to modify the system in such a way that it can be upgraded later?'. I am very tempted to copy scripts that I need to edit or add functionality to prefixing them with something like 'my_' rather than 'vp_' and hack away at them with oblivion. Will doing so actually work or will this cause conflicts somewhere due to me changing the original name of the script? Is this the best thing to do, or should I create my own smaller scripts with one, two or a few new things that inherit existing classes within?

    If I should be doing the latter I would absolutely love a few simple examples on best practices to add simple new player events/states and behaviours along with weapon states and behaviours too.

    OK lets say for example I wanted to give the player the ability to Dance. Where would I put the code listening to the player input key (say D) - In vp_FPInput (by doing so I have edited a script that would get broken on calle releasing an update) where else would I logically put this? Would I have to define this as a new event in vp_FPPlayerEventHandler or could I create a new script for this new event?! Same goes for weapon functionality but I guess if I get the workflow down for the player it'll be the same deal for the weapons.

    I guess what I am asking for is a new state/behaviour/event walk-through example(s). The print line to console one in the manual was cool, but a real world case example that doesn't alter any important scripts would be better. I can't really see any viable ways to keep things modular and separate. I'm afraid if I start adding stuff willy-nilly here there and everywhere I could be in a world of hurt a few months later down the line.

    I know v1.4 and it's new paradigms has only recently been released but any bone thrown my way would be nibbled till the marrow ran dry ;)

    Cheers
     
  10. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Awesome looking game! Seems cool, I might have to keep tabs on this.
     
  11. RowleyBirkin

    RowleyBirkin

    Joined:
    Jul 4, 2012
    Posts:
    9
    Aha, this little snippet from the Release Notes PDF answers my question about where to put new Events, but I'd still appreciate any input you guys have on my other points!

    Thanks
     
  12. TryHarder

    TryHarder

    Joined:
    Jan 1, 2013
    Posts:
    121


    Thank you guys, its certainly hard work, but I have the determination to give it my best shot, I have a great story in my head to tell with the game, so add in some challenges and action as the game unfolds and hopefully I'll feel the ambition has been accomplished. I have a 10 year old son who is super critical, so if he enjoys it that's my benchmark, some of his ideas are a little beyond the scope of this though LOL !

    Thanks again.
     
  13. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    @RowleyBirkin @TheRealFuzz: Sorry guys, have had an insanely busy week and haven't found time to reply to your questions yet (not with the level of thoroughness they deserve). I'll have an in depth look at your issues tomorrow and will reply in this thread.

    In other news... v1.4.1 is out.
    Release notes HERE.
     
    Last edited: Apr 12, 2013
  14. bubbalovesponge

    bubbalovesponge

    Joined:
    Nov 8, 2012
    Posts:
    69
    Could you please explain the changes to the controller for movement forward,back,left,right with this new version.
    You used to have:
    Code (csharp):
    1.     public void MoveForward()   {   m_MoveForward = true;   }
    2.     public void MoveBack()      {   m_MoveBack = true;  }
    3.     public void MoveLeft()      {   m_MoveLeft = true;  }
    4.     public void MoveRight()     {   m_MoveRight = true; }
    Want to have those controls broken up like they were and not sure how you coded it this new way.
     
  15. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    You could probably do something like this

    Code (csharp):
    1.  
    2. bool left = Input.GetAxisRaw("Horizontal") < 0 ? true : false;
    3. bool right = Input.GetAxisRaw("Horizontal") > 0 ? true : false;
    4. bool forward = Input.GetAxisRaw("Vertical") > 0 ? true : false;
    5. bool back = Input.GetAxisRaw("Vertical") < 0 ? true : false;
    6.  
    or

    Code (csharp):
    1.  
    2. bool left = m_MoveVector.x < 0 ? true : false;
    3. bool right = m_MoveVector.x > 0 ? true : false;
    4. bool forward = m_MoveVector.y > 0 ? true : false;
    5. bool back = m_MoveVector.y < 0 ? true : false;
    6.  
     
    Last edited: Apr 12, 2013
  16. RowleyBirkin

    RowleyBirkin

    Joined:
    Jul 4, 2012
    Posts:
    9
    Hey there,

    Just a quick note to say that the latest release 1.4.1 in the asset store seems broken. After updating in the store, and clicking import (into a fresh new project) the import process only brings in a folder 'Standard Assets' with just some projectors and their relating assets. No new files to do with FPS Camera at all! I was looking forward to reading the latest 1.4.1 manual! Is this happening with anyone else, or is it something my end? I have tried re-downloading a few times now, still the same stuff!

    Cheers
     
  17. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    This is happening to me and on other assets. Thanks VisionPunk and Phato777, I sent you a PM.
     
  18. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    I updated to 1.4.1 with no issues. It's probably an Asset Store issue. They are always having problems.
     
  19. bubbalovesponge

    bubbalovesponge

    Joined:
    Nov 8, 2012
    Posts:
    69


    thank you!!!
     
  20. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Hmmm mine still doesn't want to work. Maybe I should check in a few hours and maybe get some sleep since I've been up for nearly 24 hours :p
     
  21. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    Also, maybe try importing it into a new project. Sometimes that helps, then you can just copy the files over to your other project. I'm working on the PM you sent me as well :)
     
  22. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Thanks, I tried the update again and it worked fine in my current project. Thank you :)
     
  23. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    Awesome, check your PM in a few
     
  24. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    For anyone having issues with Unistorm and UFPSC, maybe this will help.

    1. Drag the Advanced Player prefab into your scene
    2. Drag the Unistorm Prefab into your scene
    3. Copy all the effects from the Unistorm Player Camera onto the Advanced Player>FPSCamera
    4. Move all the particles that were children of the the Unistorm Player and put them in a empty Particles game object.
    5. Make the Particles GO you just created, a child of the UFPSC Advanced Player prefab in the hierarchy.
    6. Delete the Unistorm Player
    7. Zero out all the position and rotation values for the Particle GO after it's a child of Advanced Player.
    8. Adjust the rain, snow and leaves particles to be at Vector3(0,10,0). You can adjust the Y to whatever you want.
    9. Make all the other particles at Position Vector3.zero (0,0,0)
    10. Now, on UnistormPrefab>UnistormSystem, make sure you set the Camera Object to be the Advanced Player>FPSCamera.
    After following these steps, you should be good to go with a working UFPSC and Unistorm setup.
     

    Attached Files:

    Last edited: Apr 12, 2013
  25. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,551
    With the sliding mechanic, if you slide down a long deep slope for a few seconds and then drop off of a cliff then the falloff speed quickly drops and you almost stop in mid-air. How you you have the physics carry on like normal? Your momentum should keep up instead of just stopping once you're off the slide. It only seems to carry through if you stay in contact with the floor... which... doesn't really make much sense because of friction but still, when ungrounded momentum should be kept.
     
    Last edited: Apr 12, 2013
  26. RowleyBirkin

    RowleyBirkin

    Joined:
    Jul 4, 2012
    Posts:
    9
    Damn, update still not working for me... I am using unity 4.1.2 and have tried bringing it in to new projects quite a few times now. Oh well, back to asset creation while the asset store sobers up!
     
  27. Deleted User

    Deleted User

    Guest

    Hey - for anyone having troubles importing, I may have a little fix for you. I was experiencing the same issue when importing from the asset store, so I simply did this:

    1) After updating/downloading 1.4.1, grab your path to the Unity Asset Store folder for UFPS. Mine was: C:\Users\chris\AppData\Roaming\Unity\Asset Store\VisionPunk\Scripting
    2) in a fresh scene, go Assets -> Import Package -> Custom Package
    3) paste in your path, then select the Ultimate FPS Camera.unitypackage file

    Voila!

    It would seem the issue is not with the Asset Store servers, but a bug in Unity itself...

    BTW - thanks VisionPunk! Your system is beautiful!
     
  28. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Hey VisionPunk! 1.4 is absolutely amazing! In fact, I'm soon going to be releasing my first commercial game with it! Not sure if this is the best place to post it, but here is the (older version, using 1.3) trailer for the game: http://www.youtube.com/watch?v=HZXUhzFqK1g
     
  29. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,887
    Hi there VisionPunk, wondering if you could help on a couple of issues.

    Is there a way with the AdvancedPlayer that i can start the player with weapons already obtained?

    Secondly, when I adjust the spread in the Projectile settings, no matter what value i set the spread to, the 'zoomed' state spread always returns to 2.2, and then back to my value when not zoomed.

    Thanks a lot in advance, really great asset, saved me a lot of time. Hope you can help.
     
  30. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    I really appreciate all the help I've gotten here but I was wondering one more thing. Can someone write a ladder script for the AdvancedPlayer or help me do it? Thanks!
     
  31. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,551
    How do you handle force inputs? For things like Jump pads, heavy physics objects smashing into you, objects shoving you around, etc? There is no rigidbody component on the player.
     
  32. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    $ethandownsmall.jpg

    The 1.4.1 gunman inside the Stealth tutorial. Ethan should have given me the keycard! :D
     
  33. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,551
    Another question..

    What is a safe way to parent the player to a moving object and inherit its rotation and such? For instance, if you're on a rollercoaster and you want the player to sway with the cart and be upside down and everything instead of trying to stay upright.

    Basically, I want to do cutscenes where the player can't do anything but look around and watch, so I'm thinking disable all of the controls except look, then parent the player to a rigidbody and run the scene, then turn the controls back on when its finished.
     
    Last edited: Apr 13, 2013
  34. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    Oh, no. Sorry, I didn't check back on this. I was just whining. You have done wonderfully. Don't worry about my weaknesses. All okay. I just need to climb.
     
  35. Many_Field

    Many_Field

    Joined:
    Sep 26, 2012
    Posts:
    9
    Hello,

    would it be possible to have an example to follow if you want a camera state is loaded when selecting a weapon? For example for a sniper weapon. I look around and the only direction is the way "vp_demo" or I do not know anything. My apologies.

    Another question, here's a screen to let me know, we can see that when I'm inside the shadows are not taken into account. I saw a mention in the FAQ but no solution.

    $Capture_Ombre.PNG

    Also, I just added variables for clips for each weapon, but is it possible to hide the HUD except for health for each weapon? (Another screen to view)

    $Capture_Chargeur.PNG

    EDIT: I changed the value for each of the clips in the arms vp_SimpleHUD script for "m_Player.CurrentWeaponClipCount.Get" to have a simplified HUD, but I always try to hide the HUD for "melee" for example.


    PS: Do not know to express myself clearly in your language I hope to be done still understand and asks you to be understanding :).



    Sincerely yours
     
    Last edited: Apr 14, 2013
  36. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,887
    Answered the first question, just seen the option. Just now the second point of the spread values.
     
  37. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi makeshiftwings. Sure, I'll add these things to my list of very interesting feedback! Thanks for the tips.
     
  38. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hey all. I have added a pdf with a bunch of support questions and answers that haven't made it into the FAQ yet. Thought it might be useful. Will be updating this regularly.

    DRAFT F.A.Q.
     
  39. VisionPunk

    VisionPunk

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

    Good ideas. I've been thinking along the same lines actually. The current event system documentation was written in a crunch mode frenzy. It will be extended and made clearer (if not rewritten).

    Here's an excellent introduction to events and delegates in Unity by Prime31:
    http://www.youtube.com/watch?v=N2zdwKIsXJs
    It doesn't implement delegates events in exactly the same way as UFPS but it's a great introduction to the concept.

    Ok, thanks for reporting.

    I see from the following posts that this issue was resolved. I'll look into it further, though.
     
  40. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Yeah this is real cool :)
     
  41. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    So kind of you. I shall. Your work, by the way, is looking marvelous.
     
  42. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Yeah, I think I cleared out all those old, wrong references in the v1.4.1 manual. If not let me know.

    The last approach sounds best imho. Copy the class to a new file, put it in a folder outside the UFPS folder, delete everything in it except methods that you want to modify, and change the "virtual" prefix on those methods to "override".

    • For new events, currently you have to add them to the vp_FPPlayerEventHandler class. From the 1.4.0. "Known Issues":
    • The event handler tutorial in the manual explains the complete way of adding a vp_Message event in a very basic way I think. The manual also has a description of the state system.
    • Keep in mind that Activities are more complex events and that they are different from - but work closely with - states. Quoting the manual:
    For a "Dance" ability I think an event of type vp_Activity would be best.

    Quick vp_Activity tutorial

    1. Create a new activity event "Dance", by adding it to the vp_FPPlayerEventHandler.cs script.
      Code (csharp):
      1. public vp_Activity Dance;
    2. Add a new monobehaviour script to your main player gameobject, and make the event handler available to the script by adding this code:

      Code (csharp):
      1.  
      2. vp_FPPlayerEventHandler m_Player;
      3.  
      4. void Awake()
      5. {
      6.         m_Player = transform.GetComponent<vp_FPPlayerEventHandler>();
      7. }
      8.  
      9. protected virtual void OnEnable()
      10. {
      11.         if (m_Player != null)
      12.                 m_Player.Register(this);
      13. }
      14.  
      15. protected virtual void OnDisable()
      16. {
      17.         if (m_Player != null)
      18.                 m_Player.Unregister(this);
      19. }
      20.  
    3. Also, add the following methods. These are what will be triggered when the "Dance" button is pressed versus released.
      Code (csharp):
      1.  
      2. void OnStart_Dance()
      3. {
      4.         // trigger dance animation here
      5. }
      6.  
      7. void OnStop_Dance()
      8. {
      9.         // stop dance animation here
      10. }
      11.  
    4. Optionally add the following methods to block or allow the respective callbacks.
      Code (csharp):
      1.  
      2. bool CanStart_Dance()
      3. {
      4.         // return false here if dancing is currently illegal
      5.         return true;
      6. }
      7.  
      8. bool CanStop_Dance()
      9. {
      10.         // return false here if dancing is currently mandatory
      11.         return true;
      12. }
      13.  
    5. Now you have the option of editing the vp_Input script directly or inheriting it as described HERE.
    6. When you have decided which approach suits you best, create an input axis called "Dance" and add this code somewhere under the Update in your chosen input script:
      Code (csharp):
      1.  
      2.         if (Input.GetButton("Dance"))
      3.             Player.Dance.TryStart();
      4.         else
      5.             Player.Dance.TryStop();
      6.  
    7. Furthermore, if you add this line in the player event handler script's Awake, any state on any component in the player hierarchy that is named "Dance" will start and stop with the event.
    Code (csharp):
    1. BindStateToActivity(Dance);
    (Just for clarity: I assume what you want is not a way to extend the system without scripting (a modular 100% in-editor drag drop system). UFPS definitely requires scripting in order to be extended.)

    • If you want to use events in your own classes, this is covered by the event handler tutorial and now the above activity tutorial. You currently have to alter the vp_FPPlayerEventhandler class. This is a temporary solution and will change in upcoming releases.
    • For input, you will have to inherit or edit vp_FPInput. This is by design and intended.
    • If you want to use states in your own classes, this can be done as long as you inherit from vp_Component and duplicate modify an existing custom editor class to get a proper Inspector gui.
    All that said, I have been gradually moving more and more logic into the editor (for example, the state blocking feature was previously a scripting feature) and that will likely continue. Also, I know this new event stuff is really daunting to beginners. I've been moving in this direction because it's the proper way when a game becomes more complex, and the system must support making real games and not just for-fun prototypes. The challenge moving forward will be keeping the system easy to pick up for beginners aswell as tasteful to the pro and usable in a complex product. Not an easy task I can tell you that. But rest assured. Over time everything will become simpler and there will be more tutorials. These are just the early days.
     
    Last edited: Apr 15, 2013
  43. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    You should probably listen to him ... As Picasso once said: "Every child is an artist. The challenge is to remain an artist once he grows up." :D. But seriously... can't wait to see more of it.
     
  44. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thx phato.. That's great. Will add to FAQ.
     
  45. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi zerobounds, I just had a look at this and it's a design bug. To fix it do this in vp_FPController:

    1. Add the following variable at the top:
    Code (csharp):
    1.  
    2.     protected float m_SlideFallSpeed = 0.0f;    // fall speed resulting from sliding fast into free fall
    3.  
    2. Add this at the end of the "UpdateSliding" method.

    Code (csharp):
    1.  
    2.         // handle fast slide transition into free fall
    3.         if (m_SlideFast)
    4.             m_SlideFallSpeed = Transform.position.y;    // store y to calculate difference next frame
    5.         else if (wasSlidingFast  !Grounded)
    6.             m_FallSpeed = Transform.position.y - m_SlideFallSpeed;  // lost grounding while sliding fast: kickstart gravity at slide fall speed
    7.  
    I'll include this fix in a new version. Thanks for reporting!
     
  46. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thx :) ... and thank you for the importing tips! Good FAQ material.
     
  47. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Great to see, jSoftApps! Got a Tron feel going there. And sweet floor shading.. Cool to hear that you're near complete with a game!
     
  48. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi Fishman. Yes, the AdvancedPlayer has a SimpleInventory component. Unfold the component and the weapon items list. Notice that each weapon has a parameter Have. This determines how many items of a certain type that the player has (actually for weapons 1 is the max right now). Just set "Have" to 1 for all weapons and the player will start with them. You can also set start ammo in the inventory component.

    This is likely because the AdvancedPlayer, being so advanced ;), uses multiple states, and reads its runtime values from state preset scripts. Open the "States" foldout of the weapon in question. Find the "Zoom" state and click on the preset field. A preset script will be highlighed in the Project view. You can open this script and edit it to set the spread value that you want for zoom. Or just delete the value from the script.
     
  49. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Anyone? :)
     
  50. freakprince

    freakprince

    Joined:
    Apr 25, 2012
    Posts:
    63
    hey...you guys have any clue why on earth from all the ultimate fps features the bob feature doesnt work for me? it works on an empty scene but not on my actualy game scenes and i dunno what goes wrong(there are no errors or anything)
     
Thread Status:
Not open for further replies.