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

    supericon

    Joined:
    Feb 15, 2013
    Posts:
    63
    Any news on the Pause (TimeScale) bug? I tried setting the timescale to .00001 but it still messes up.

    EDIT: Just read the FAQ - need to wait till v1.4 by the sound of it.
     
    Last edited: Mar 17, 2013
  2. devfo

    devfo

    Joined:
    Jul 24, 2012
    Posts:
    49
    I know SOOOO many people have been asking this, but it's almost the end of the 1st quarter of 2013, and v1.4 isn't out still. I'm not trying to be rude or impatient, just wanting to know a more specific date for the release, since the first quarter of 2013 doesn't seem to work out too well.
     
  3. majestic12

    majestic12

    Joined:
    Feb 5, 2013
    Posts:
    15
    Why not? He said first quarter. Sure, ask him in 2 weeks if it's not out, but at the moment, it's still on schedule.
     
  4. screenracer

    screenracer

    Joined:
    May 9, 2011
    Posts:
    112
    I wanted to let you know how I have gotten around this issue for the time being. I have to use the unity fps example setup, but I was able to use your head motion script inside of the unity example setup. When I did this, I no longer had a sound problem.

    I think you are correct about it being related audio hardware performance as a root of the issue. But something is going on when you create the audio listener at run time that is over stressing the hardware. On my main computer I am using the on-board 5.1 audio. I do not use a dedicated card. And since I am aiming for a lower target benchmark, many of our users will have run of the mill computers and android devices. Note, I get the same result my gaming Asus Laptop. I sent you a PM with some links so you can check it out for yourself.

    Thank you for being so great at replying to all of question, outstanding support after sale :)
     
  5. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi kaiber. This FAQ post LINK always has complete info on the next release timing (even when there is very little or no info ;) .)

    Cal
     
  6. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    You should be able to solve this using the manual or this FAQ post and basic scripting for pickups. Let me know if there is a bug / limitation that I've missed.
     
  7. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    This is completely fixed in 1.4 (note that the FAQ has some technical details for fixing it yourself if you want to).
     
  8. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    I concur with majestic's interpretation :). I understand your impatience though. Can only tell you I'm working on it like a madman.
     
  9. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Ok, I'm glad you got it to work. If you still have issues with this in 2-3 weeks please get back to me. I think it's an interesting problem and would like to look into it when I have a little more time.

    Cal
     
  10. screenracer

    screenracer

    Joined:
    May 9, 2011
    Posts:
    112
    We were using the weapon system for items. Unfortunately we can not use that with the standard Unity example FPS setup. Note, to check your messages so you can check out our build and issue first hand. Thanks!
     
  11. PsycHead

    PsycHead

    Joined:
    Sep 14, 2012
    Posts:
    17
    Hey!
    I need to change the system to work with a rigidbody-character. Now I know this means changing quite a lot, and I'm not sure if I shouldn't start completely from scratch instead, just using your system as a reference.

    Has this been done or tried before?
     
  12. kaiber

    kaiber

    Joined:
    Mar 4, 2013
    Posts:
    15
    Excellent. I'll be patient then :)
     
  13. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    266
    Just purchased Ultimate FPS Camera and loving it.

    But, I'm trying to get it working on the Ouya Dev Kit. I've been able to hack together some basic functionality, but the real question is, can I control the FPSController using something more fine grained than Contoller.MoveForward();

    I'd also like to have looking controlled by the right thumbstick as well. I'd love to have a clue as to how to implement this.

    A good workflow tutorial (or section in the FAQ) for getting Ultimate FPS Camera working with controllers would be awesome, and could easily be applied to Xbox, PS3, and Ouya controllers.
     
  14. daisySa

    daisySa

    Joined:
    Dec 29, 2011
    Posts:
    341
    Not saying it can't be done, but be aware that you may experience performance issues using UFPS with the Ouya. It's not really designed for mobile platforms (the controls are easy enough to add, the issue is CPU power for the physics).

    Nevertheless, I'm doing the same as you - building with UFPS for the Ouya. If it's too slow I'll just switch it to a desktop implementation (the flexibility of Unity!).

    I think the developer said he's looking at getting a mobile version out in Q3 this year, but don't quote me on that.
     
  15. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    The underlying Character Controller that powers the movement was designed for key presses (WASD) and mouse input. It is not really meant for thumb sticks. I'd start by taking a look at how character movement is driven on touch environments (e.g iOS, Android) and use that philosophy to write a script to power your character.


    For right stick moving (e.g looking around), again, I would see how it is implemented without a mouse and begin from there. It should be as simple as detecting if the trigger is down, determine which direction it's facing, and use that the rotate your camera rotation.

    A tutorial isn't strictly necessary in my opinion, as that really teaches you nothing, and this is easy to figure out yourself in my opinion. For further information, I will direct you to these hopefully helpful pages:

    http://docs.unity3d.com/Documentation/ScriptReference/CharacterController.Move.html
    http://docs.unity3d.com/Documentation/Manual/Input.html
     
  16. lastprogrammer

    lastprogrammer

    Joined:
    Apr 30, 2011
    Posts:
    166
    So, I had just downloaded the your latest version but I still see a lot of the same problems with the original release. First up is the problem with Activating your objects. Unity 4 changed things so now I'm getting those annoying error messages. This has an easy fix that I'll like to share with you.

    Activation Class for Different Unity Versions

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class ActivateHelper {
    5.  
    6. /// <summary>
    7. /// Send any game object here and this will activate or deactivate it for any version of Unity
    8. /// </summary>
    9. public static void ActivateObj(GameObject obj, bool activate) {
    10. #if UNITY_4_0 || UNITY_4_1
    11. obj.SetActive(activate);
    12. #else
    13. obj.SetActiveRecursively(activate);
    14. #endif
    15. }
    16. }
    This way, everytime you need to activate or deactivate a game object you would simply call ActivateHelper.ActivateObj(gameObject, true); No more error messages and everything is compatible with all versions of Unity.

    Optimize your code!

    The second major thing you need to do with you project is Optimize it! You keep calling gameObject, or transform, or camera, and many other un-optimized calls to properties of Monobehavior. These are extremely bad calls to make in any Update loop. Check out this documentation about the subject:
    HTML:
    http://answers.unity3d.com/questions/63788/are-transform-gameobject-rigidbody-component-calls.html
    $2013-03-18_1514.png

    $2013-03-18_1518.png

    This of course, only demonstrates transform. But you have many calls to variables in many of your scripts. Calling transform, or camera, or gameObject, is equivalent to calling GetComponent<GameObject>(). This is easy to fix.

    Change Your Input Mechanism!

    And the third problem I have is your input mechanism. You hard program all your input! What the hell are you doing that for? You only allow four bools to move forward, backward, left, or right. This is absurd! You need to allow open access to your movement vector via a property. In fact, I have written a property just for that: (there are three properties for the three different scripts that require input vectors)

    For the vp_FPSController.cs:

    Code (csharp):
    1.  public Vector3 AccessThrottle {
    2. get {
    3. return m_MotorThrottle;
    4. }
    5. set {
    6. m_MoveFactor = 1f;
    7. // if on the ground, modify movement depending on ground slope
    8. if (m_Controller.isGrounded)
    9. m_MoveFactor *= GetSlopeMultiplier();
    10.  
    11. // if in the air, apply air damping
    12. else
    13. m_MoveFactor *= MotorAirSpeed;
    14.  
    15. // keep framerate independent
    16. m_MoveFactor *= Delta;
    17. m_MotorThrottle += value * (MotorAcceleration * 0.1f) * m_MoveFactor;
    18. }
    19. }
    For the vp_FPSCamera.cs:

    Code (csharp):
    1.  public Vector2 AccessMouseMovement {
    2. get {
    3. return m_MouseMove;
    4. }
    5. set {
    6. m_MouseMove = value;
    7. }
    8. }
    and finally, In vp_FPSWeapon.cs:

    Code (csharp):
    1.  Vector2 inputMouseMove = Vector2.zero;
    2. public Vector2 AccessInputMouseMove {
    3. get {
    4. return inputMouseMove;
    5. }
    6. set {
    7. inputMouseMove = value;
    8. }
    9. }
    10.  
    11. ///////////////////////////////////////////////////////////
    12. // applies swaying forces to the weapon in response to user
    13. // input and character controller motion. this includes
    14. // mouselook, falling, strafing and walking.
    15. ///////////////////////////////////////////////////////////
    16. protected void DoWeaponSwaying(Vector3 velocity)
    17. {
    18.  
    19. // limit position velocity to protect against extreme speeds
    20. velocity *= PositionInputVelocityScale;
    21. velocity = Vector3.Min(velocity, Vector3.one * PositionMaxInputVelocity);
    22. velocity = Vector3.Max(velocity, Vector3.one * -PositionMaxInputVelocity);
    23.  
    24. // calculate local velocity
    25. Vector3 localVelocity = trans.InverseTransformDirection(velocity / 60);
    26.  
    27. // get mouse input for this frame
    28. //Vector2 mouseMove = new Vector2(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y"));
    29. Vector2 mouseMove = AccessInputMouseMove;
    This way I can have any type of input from any type of input device, including mobile and controllers. This is another easy remedy.


    What I really like about your system is the fluid movement that it can produce, but also, sometimes this movment looks wrong if done to an extreme level. But I like your State system, where I can turn different states on and off and the springs would automatically interpolate between the variable changes. That is pretty cool.

    Good luck! I hope you implement some of my suggestions, especially the optimizations.

    Message me if you need help with any of this.
     
  17. VisionPunk

    VisionPunk

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

    Long time no see :) Yeah, the thing is there hasn't been a release for quite a while and I've been stuck in development hell. Good news is many of the issues discussed here lately have been addressed in the soon-to-be-released code. Regarding your feedback:

    • Unity 4 activation wrapper: has been suggested before and will be in the next version.
    • Caching transforms. I've pretty much rewritten all the classes and removed many GetComponent calls and such. Was planning to take care of caching transforms for the mobile version later this year but I might have a look this week. Should be a quickie.
    • Regarding the input: this has been completely rewritten. I'm now exposing the movement vectors directly via properties and a delegate based event system. Kind of like you suggest but a little bit differently. You will either love it or hate it.
    Thanks for the great feedback! I'm keeping it on file for further optimization.

    Cal
     
  18. clinton-reddie

    clinton-reddie

    Joined:
    Mar 20, 2013
    Posts:
    18
    Hello,

    Your camera system has done much for my project, but I've encountered a problem. When using dual screens or playing my game in the editor without full-screen mode enabled, the mouse cursor centers off screen, so when I try to shoot, it clicks off screen and exits me from the game. How can I fix this problem? Thank you.
     
  19. Moonlight

    Moonlight

    Joined:
    Jun 7, 2010
    Posts:
    41
    that is actually what happens with most projects, and it is a problem with the lock cursor command in unity, not UFPSC
     
  20. clinton-reddie

    clinton-reddie

    Joined:
    Mar 20, 2013
    Posts:
    18
    Can this be fixed? I searched but didn't find anything that I understand.
     
  21. EliteMossy

    EliteMossy

    Joined:
    Dec 2, 2012
    Posts:
    513
    Got some weird performance problem

    http://puu.sh/2ld6X

    Not sure what is causing it, but so far i have not touched anything in Update() on FPSController
     
  22. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Hey Visionpunk! I have another (nooby) question for you. I saw that you had some instructions on your FAQ on getting pausing to work, but I guess I still don't really understand. Do you think you could give a more detailed process on what you're supposed to do?Thanks!
     
  23. Moonlight

    Moonlight

    Joined:
    Jun 7, 2010
    Posts:
    41
    As far as I know it can't be fixed, I just click back in the game view and it works fine after that.
     
  24. superme2012

    superme2012

    Joined:
    Nov 5, 2012
    Posts:
    207
    Been doing some more work on my network project, I have just completed the damage death re-spawn system but bumped into a small problem that I need some help with.

    I need to displayed an indication of damage to the player FPS cam, but I can’t seem to get any GUI Textures to work with the cam/cams.

    I guess the best way to describe this, is a damage red flash when hit. I already have the coms working and the data is there sitting on the client, just can’t get the dam GUI to work, lol.

    If it’s already solved then please just point me to the post ;p..

    Also little side note, I used NavMesh for the AI path finding, I have it following the closest client as a target with proximity, which is kind of cool and a really clean solution to build up network AI agents.

    I’m going to run a EC2 micro instance with a basic death match game level (no ai the first test), it’s for bandwidth latency tests but ill post it on the forum for you all to check out.
     
  25. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    [OFF]
    Hi,
    I'm looking for a VPS solution. What do you think about EC2?
    [/OFF]
     
  26. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Yeah I agree with Moonlight. It's a Unity issue and has annoyed me a lot too. You can change the behavior of Ultimate FPS Camera somewhat by altering the LockCursor property of vp_FPSPlayer. By changing the default value to false or disabling the feature you may be able to modify the workflow to something that works for you.
     
  27. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hey EliteMossy. Does this happen right away when you start the application or does the problem worsen over time?
     
  28. superme2012

    superme2012

    Joined:
    Nov 5, 2012
    Posts:
    207
    Thanks, I'll let you know how I get on with it. So far just local network testing which has been really good... I will be running it under no graphics on the EC2 instance. Not sure what the limitations are with that just yet.
     
  29. lusho_games

    lusho_games

    Joined:
    Jun 4, 2011
    Posts:
    63
    Thanks for this info, however, it's not working for me.

    Here's what I have:

    2 weapons added to the player, activated both.

    then this script attached to other gameobject:
    Code (csharp):
    1.  
    2. var NoWeapon : true;
    3.  
    4. var Player : GameObject; //FPSPlayerGO
    5. private var vpWeaponScript : Component;
    6.  
    7. function Start (){
    8.  
    9.     vpWeaponScript = Player .GetComponent("vp_FPSPlayer");
    10.  
    11.     if(NoWeapon){
    12.    
    13.         vpWeaponScript.m_AvailableWeapons.Clear();
    14.        
    15.     }
    16. }
    And when I press play, I have all weapons enabled. This should clear the player from weapons, right?
     
  30. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Quick question, in dropping my own scripted art into the existing starter scene, the bullet decals are spawning on my trigger surfaces. What would I have to do to tell the projectiles to ignore a certain layer - or where would I start?

    I would expect there to be obvious collisions with colliders but spawning decals when hitting colliders set to triggers is new, I guess theres reason for that.

    Thanks :)
    ~A
     
  31. EliteMossy

    EliteMossy

    Joined:
    Dec 2, 2012
    Posts:
    513
    it does not get any worse, and happens all the time i think, i will just go do some checks
     
  32. J-F

    J-F

    Joined:
    Nov 8, 2012
    Posts:
    101
    Hello again. I came up with a problem again i cannot manage to solve. Is there any way to tag an zone/trigger so that the bullets won't interact with it. I've tried to disable raycasting on them but that will break their purpose because some of them work by detecting rays. I have this problem with sequence triggers and detectors on my AI.
     
  33. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    This has been asked many times already. Please search this thread.
     
  34. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hmm.. You also need to execute SetWeapon with 0 as an argument. Availableweapons does not unwield any weapons. It just prevents them from getting wielded again "from now on". If that doesn't work: what happens if you bind a method with these two calls (availableweapons.clear and setweapon 0) at runtime?
     
    Last edited: Mar 24, 2013
  35. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    SevenBits is right this has likely been discussed before. Can't remember if I posted this solution before though so here goes:

    Code (csharp):
    1.  
    2.  
    3. // raycast against everything except the player itself and
    4. // debris such as shell cases
    5. if(Physics.Raycast(ray, out hit, Range, ~((1 << vp_Layer.Player) | (1 << vp_Layer.Debris))))
    6.  
    7.  
    .... and change it to this:

    Code (csharp):
    1.  
    2.  
    3. // raycast against everything except the player itself and
    4. // debris such as shell cases
    5. if(Physics.Raycast(ray, out hit, Range, ~((1 << vp_Layer.Player) | (1 << vp_Layer.Debris) | (1 << LayerMask.NameToLayer("Ignore Raycast"))))
    6.  
    7.  
    Using this solution you will have to set the layer of your trigger to "IgnoreRaycast". This will be supported from start in v1.4. There is also a slightly related issue pertaining to enemy colliders (where we want the bullets to hit but not necessarily to leave a decal) with a tag based solution, see the following FAQ post:

    http://www.visionpunk.com/products/ufpsc/faq/FAQ_Temp.html#7-10
     
    Last edited: Mar 24, 2013
  36. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Here goes,

    A sneak preview of some of the new features in v1.4.

    This is basically the old demo extended with two new scenes showing some of the new physics, slow motion mode, new weapon motion features, tap-firing, and some gameplay example / helper scripts such as various types of pickups and a basic death implementation. Also, in the first scene notice that the mace is now alive, and try out the new progressive jumping (press and hold for a longer jump). If jumping or falling onto tilted surfaces you'll slide.

    http://www.visionpunk.com/products/ufpsc/misc/SneakPreview1.4.html

    Note that this has not been released yet. For my best guess as to the release date (along with a a list of confirmed features) see this FAQ post.

    Finally, I should say that I'm considering raising the price sharply from the current $15 upon release of v1.4. Actually haven't decided yet but just wanted to give a headsup that if you haven't picked up your lifetime license yet, now is a Good Time ;) ... Purchase links for Asset Store and PayPal can be found here.

    Have fun!

    Cal
     
    Last edited: Mar 24, 2013
  37. nosyrbllewe

    nosyrbllewe

    Joined:
    Oct 18, 2012
    Posts:
    182
    WOW! I cant wait until 1.4 is released! The new update is amazing.
     
  38. phato777

    phato777

    Joined:
    Dec 14, 2012
    Posts:
    138
    This is fantastic. Can't wait. Good work Cal! Really looking forward to the melee stuff. I've implemented melee with 1.3, but I want to run with new update as it's all been reworked and I'm willing to put in the extra time to get the new melee system up and running in my game. Thanks for all your hard work!
     
  39. GD-Darren

    GD-Darren

    Joined:
    Jan 12, 2013
    Posts:
    53
    Can this be used on a game which will have a 3D character model in front the camera doing the movement. I'd really like the camera effects behind the model alone. Can it be done easily? Thanks for your time.
     
  40. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi GD. Have a look at this FAQ post, which has the current info on 3rd person.
     
  41. J-F

    J-F

    Joined:
    Nov 8, 2012
    Posts:
    101
    just sayin that when i try to play the demo, whenever the player dies the respawn sound gets spammed, in the first try the spammed sounds stopped when the player respawned, But repeating that causes it to stay. even when the player has already respawned.
     
  42. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thanks for the headsup. I'll look into that!
     
  43. superme2012

    superme2012

    Joined:
    Nov 5, 2012
    Posts:
    207
    Sweet, im now using uLink.... ;p
     
  44. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Cool.. let me know if it's good.
     
  45. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    I tested the preview and instantly bought it. I'm having trouble getting it to work in my project and understand it has problems with UniStorm, which I'm using. It takes away my sky boxes and the player either falls a bit into my terrain or fully through it.

    I guess I'll wait until the next update :)
     
    Last edited: Mar 24, 2013
  46. J-F

    J-F

    Joined:
    Nov 8, 2012
    Posts:
    101
    Also i noticed 2 more things.

    First, when the player dies from an explosion while he is in mid air the camera on the corpse might turn upside down and keeps falling upwards.

    $Screen shot 2013-03-24 at 20.36.58.png

    Second, if the ammunition of a weapon is depleted and you press fire while picking up ammo clips causes the weapon to not have the reload animation but you can still hear the reloading sounds playing about twice as long as normally should.
     
    Last edited: Mar 24, 2013
  47. lusho_games

    lusho_games

    Joined:
    Jun 4, 2011
    Posts:
    63
    It works now!, thanks.
     
  48. joshimoo

    joshimoo

    Joined:
    Jun 23, 2011
    Posts:
    266
    When trying the demo for 1.4 Single click shooting for the pistols does not seem to work.
    I can only shoot one bullet and then need to reload.
    If I hold the shoot button (mouse1) then it will continue fire but rapidly clicking does not.

    Also is the mouse acceleration/smoothing optional so I can turn it off?
     
  49. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thanks J-F. These are all now fixed. I have uploaded a new webplayer with the fixes.

    Thanks for reporting this, joshimoo. There is a new tap-firing feature that had broken in the old webplayer. Should work now.

    Yes it is optional. It can not be toggled in the demo, but nothing prevents your game from exposing this to its options. BTW: the final gameplay demo scene uses medium mouse smoothing but no acceleration.

    Re-posting the link for those who may have missed it:

    Here's a a sneak preview of some of the new features in v1.4.

    This is basically the old demo extended with two new scenes showing some of the new physics, slow motion mode, new weapon motion features, tap-firing, and some gameplay example / helper scripts such as various types of pickups and a basic death implementation. Also, in the first scene notice that the mace is now alive, and try out the new progressive jumping (press and hold for a longer jump). If jumping or falling onto tilted surfaces you'll slide.

    http://www.visionpunk.com/products/ufpsc/misc/SneakPreview1.4.html

    Note that this has not been released yet. For my best guess as to the release date (along with a a list of confirmed features) see > this FAQ post <.
     
    Last edited: Mar 24, 2013
  50. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thanks for buying! Regarding Unistorm, this post may be of some help. Regarding the other issue; yeah you could wait for 1.4 and see if it works with the new controller, or PM me and describe your setup a little bit more.
     
Thread Status:
Not open for further replies.