Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    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
    @DeadHope: That's correct. The bullet class does not launch a prefab, but uses raycasting. Check out line 55 of vp_Bullet.cs. The 'hit' variable will contain the object hit by the raycast. On the line below you could do:
    Code (csharp):
    1. hit.collider.SendMessage("Damage", SendMessageOptions.DontRequireReceiver);
    If the hit object has a "Damage" method, this should get executed (in the upcoming release this will be supported by default).

    @Kinos: thanks a lot :)
     
    Last edited: Jun 4, 2012
  2. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    I appear to be having a similar Preset issue that other have posted about.

    The only way I can get Presets to work, is via Script.

    What I have done:

    • Follow the tutorial on setting up a new FPSPlayer.
    • Dont do the step which adds the Simple Script.
    • Change some settings
    • Play the game

    This results in the settings reverting back to the original values. Any reason for this?
    If I now select another Preset, for example ModernController, I can see that in the edit the values change. Press Play, and they revert back to before I added the preset.

    Any help would be appreciated.

    Adam
     
  3. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    Hi,

    I have added the following to the vp_DecalManager class at line 106:

    Code (csharp):
    1. if (m_Decals[0] != null  m_Decals[0].renderer != null)
    I am going to use this in a mobile game, and I do not need to render any decals when hitting objects. So I created a custom Bullet prefab without the Decals, and needed to add this into the DecalManager class to get it running properly.

    Hopefully this is a meaningful change and could get pushed into the next update.
     
  4. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    (Sorry for multiple posts)

    As you are adding in Damage, would it also be possible that instead of hardcoding the "Damage" function name, we could set this via the Inspector? This would allow it to work with many solutions out of the box.
     
    Last edited: Jun 6, 2012
  5. cpasjuste

    cpasjuste

    Joined:
    Apr 2, 2012
    Posts:
    138
    Hi VisionPunk, i'm using your work since a few days and i must say that it saved me a lot of time, and your approach is pretty good.
    I would have a few requests tought :

    - Allow the jump force to be higher than 1.0f: maybe it's a limitation from the character controller but i'd like to be able to do some really big jumps without having to add an external force manually.

    - Allow loading presets to a structure to apply them without having to load from resources each times.

    - Allow smooth transitions from a preset to another.

    - Use local rotation for the camera effects: this allow external rotation of the camera without affecting your camera effects, for example child the camera to a "CameraOffset" GameObject and be able to rotate it without affecting your effetcs.

    Again, good work :)

    Thanks,
    David.
     
    Last edited: Jun 6, 2012
  6. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi mimmito.. you're maybe onto a pretty elusive bug. To try and verify this I did all the steps you outlined to create an FPSPlayer manually (skipping the SimpleScript), and thus ending up with a player that can rotate the camera but can neither walk nor shoot. I then changed a few values on the FPSController and the FPSCamera and hit play. They stayed the same. I also tried loading the ModernController onto the FPSController and hit play and they did not reset. In fact I cannot find a way to have the values cleared or reset :/

    What version of Ultimate FPS Camera are you using? (see the ReleaseNotes PDF) What OS Unity version? I tried to reproduce this bug on the latest Ultimate FPS Camera v1.21 and in Unity 3.4.2, Unity 3.5.0 and Unity 3.5.2.

    I believe the preset problems people have had so far fall into these 2 categories:
    ● Some users didn't realize that there were scripts in the default prefabs resetting component values by loading presets. Do you have no scripts whatsoever in the hierarchy except the vp_FPSController and vp_FPSCamera? To make this less confusing I uploaded a SimpleScript that does not use preset loading (earlier in the thread).
    ● Atleast a couple of other people who had problems were likely victims of the following Unity (non UFPS related) bug: http://answers.unity3d.com/questions/233893/issue-with-saving-prefab-parameters-in-unity-35.html
    Sometimes you can "mend" a prefab that keeps clearing its values by breaking the prefab connection and recreating the prefab (perhaps clearing some bad / broken Unity metadata).

    But I'm very open minded and on the lookout for any rare sneaky bugs. So please let me know if you find out something more.

    /Cal
     
  7. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    @mimmito:
    Thanks for the suggestions! Yeah, these may both be good additions. I'll look into it.
     
  8. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    Hi,

    I think the issue is resolved now, fingers crossed.

    I think it was due to the fact my project was set to WebPlayer in the build settings. As soon as I changed it back, it began working again. I see that you do certain processing as long as it not running under a WebPlayer. This must of been the issue (as in the editor, it classes itself ans running under the current platform you have chosen.

    I also noticed the issue with the Prefab. As soon as I deleted the Prefab from my scene, and added it back in, it appeared to hold its settings (such as the Bullet prefab). Ive not seen issues so far.

    Its quite strange, but maybe you could look into your code for loading presets, and check if its running in the editor or not? Everything should work in the editor I suppose.

    Adam
     
  9. urawhat

    urawhat

    Joined:
    May 25, 2012
    Posts:
    13
    OK corrected and found the whole process for making this work on a mobile.
    One key question I have is this:
    Within the SimpleScript.cs you have the WASD but the vp_FPSCamera.cs is controlling the mouse XY axis.

    How would you migrate that to be used wihin the SimpleScript.cs?

    The reason I ask is that my Contains( work just right now fr touch controls, but vp_FPSCamera.cs will not stop rotating until I let go completely of the mobile screen for all touch inputs.

    I can see now why you have not approached the whole iOS version, but I almost have a full working model for you if you want me to email it to you (Note: might not be the best hacked code but works).

    What I used within the vp_FPSCamera:
    Code (csharp):
    1.     if(Input.touches.Length > 0)
    2.         {
    3.         int i = 0;
    4.         while (i < Input.touchCount)
    5.             {  
    6.             if (Input.touches[i].phase)
    7.                 {
    8.                 Vector2 fingerPos = Input.GetTouch(i).position;
    9.                 Vector2 RealFinger = new Vector2(fingerPos.x, Screen.height - fingerPos.y);
    10.                 // PAN LEFT
    11.                 if(rpanleft.Contains(RealFinger))
    12.                     {
    13.                     this.m_MouseMove.x = this.m_MouseMove.x - sensitivityX;
    14.                     }
    15.                 // PAN RIGHT
    16.                 if(rpanright.Contains(RealFinger))
    17.                     {
    18.                     this.m_MouseMove.x = this.m_MouseMove.x + sensitivityX;
    19.                     }          
    20.                 }
    21.             ++i;
    22.             }
    23.         }
    24.     else
    25.         {
    26.         this.m_MouseMove.x = 0;
    27.         }
     
  10. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    Hi,

    Could anyone help me with a Limp preset? I have gotten part of the way there with the Camera and Controller values being modified using the Drunk Preset as a starter.

    I think the values I need to modify are as follows (these are the ones I am using currently):

    Controller:
    MotorAcceleration 0.04

    Camera:
    BobRate 0.6 0.6 0 0
    BobAmplitude 2 1 0 0

    Any help would be appreciated. Im looking for a constant limp, dont mind which leg!
     
    Last edited: Jun 7, 2012
  11. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    @David: All good suggestions!


    • "Jump force": I will increase the range. In the meantime you may edit line 58 of "Editor/vp_FPSControllerEditor.cs". Just change the "1" to a larger value.
    Code (csharp):
    1. m_Component.MotorJumpForce = EditorGUILayout.Slider("Jump Force", m_Component.MotorJumpForce, 0, 1);
    • "Allow loading presets to a structure": Good idea. I'll add it to the backlog.
    • "Smooth transitions": This should be very possible using scripting once you get familiar with how everything interacts. Email me if you want help figuring it out.
    • "Local rotation for the camera effects": I definitely can see the point, though I'm hesitant to add even more gameobjects to the hierarhy. It has gotten a bit complex as it is.

    Thanks for the feedback!

    /Cal
     
  12. cpasjuste

    cpasjuste

    Joined:
    Apr 2, 2012
    Posts:
    138
    Thanks :)
    Your probably right for the game object count but it's also something easy to modify for me so its not a big deal. For the smoothing don't waste your time I'll take a look when really needed.

    Again, good work, I like your implementation which is light, clean and well designed (except for the presets loading from file but well I guess most people don't need to change the presets a lot or /and are working on mobile like me. Still I didn't noticed any slowdown with this so its just to optimize every bit :p )
     
    Last edited: Jun 8, 2012
  13. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    @urawat: Unfortunately I haven't gotten around to building for mobile yet, so I can't answer the touch logic specific questions. Hopefully someone else in the thread / forum has some ideas regarding the technical aspect.

    What I do know amounts to this: for FPS input on mobile you should split the screen down the middle. All touches in the left rect counts as movement, i.e. "WASD". All touches in the right rect counts as rotating the camera, i.e. "Mouselook". Plus buttons for shooting and jumping at the right side. I'm sure you're already on top of this though ;)

    Sure, I would be very interested to see what you have!

    Thanks

    /Cal
     
  14. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    @mimminito: Check out the "CrouchController.txt" and "CrouchModernCamera.txt" presets. I think these would work quite well for limping. Just copy the presets and change the following line in the camera preset ...

    Code (csharp):
    1. PositionOffset 0 -1 0
    ... into this ...

    Code (csharp):
    1. PositionOffset 0 0 0
     
  15. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    Brilliant! Thanks for the help, ill test this out.

    The example I posted up seems to be working ok atm, but ill check what this looks like.
    Hopefully ill be able to post what Ive been working on soon, get some feedback from you guys and see what you think.

    Another question, the weapons have recoil, but what about the Camera/Crosshair? I have tried the shake functions but nothing has resulted in something plausible yet.
     
  16. urawhat

    urawhat

    Joined:
    May 25, 2012
    Posts:
    13
    @Cal Sent you an email.
    To the rest who might be interest thi is what I did in short. It might not be as good as @thelastprogrammer but I'm still learning Unity.

    Set up Varibles for the images
    Example Jump icon:
    public Texture2D jumpicon;
    Set the Rect as Private:
    private Rect rjump;

    Within the OnGui
    rjump = new Rect(Screen.width-152,Screen.height-170,48,48);
    GUI.DrawTexture(rjump, jumpicon);

    Within the Update
    if(Input.touches.Length > 0)
    {
    int i = 0;
    while (i < Input.touchCount)
    {
    Vector2 fingerPos = Input.GetTouch(i).position;
    Vector2 RealFinger = new Vector2(fingerPos.x, Screen.height - fingerPos.y);
    // Make FPS Jump
    if(rjump.Contains(RealFinger))
    {
    m_Controller.Jump();
    }
    ++i;
    }
    }
    The trick is that the mobile version Y position is inverted so you have to flip it using Screen.height - the touch y position or it wont get the correct location.

    You can do this with both the WSAD and also the movement within the vp_FPSCamera but the vp_FPSCamera is tricky and still working on that part. Maybe deltaposition would work and im still working on that part.
     
  17. urawhat

    urawhat

    Joined:
    May 25, 2012
    Posts:
    13
    HA!
    OK looks like typing of your issue does help. I now have the camera movement working.
    In short do what I talked about above but for the FPSCamera do this. (no im not going to wrap this witjthat code tag. thing seems to fill up the web post)
    Within the void Update
    if (Input.touches.Length > 0)
    {
    int ipan = 0;
    while (ipan < Input.touchCount)
    {
    Vector2 fingerPos = Input.GetTouch(ipan).position;
    Vector2 RealFinger = new Vector2(fingerPos.x, Screen.height - fingerPos.y);
    if(rpanleft.Contains(RealFinger))
    {
    Vector2 delta = Input.touches[ipan].deltaPosition;
    float rotationZ = delta.x * sensitivityX * Time.deltaTime;
    m_MouseMove.x = invertX ? rotationZ : rotationZ;
    float rotationX = delta.y * sensitivityY * Time.deltaTime;
    m_MouseMove.y = invertY ? rotationX : rotationX;
    }
    ++ipan;
    }
    }
    else
    {
    m_MouseMove.y = 0;
    m_MouseMove.x = 0;
    }

    this.m_Delta = Time.deltaTime * 60f;
    this.UpdateMouseLook();
     
  18. dyrwoolf

    dyrwoolf

    Joined:
    Oct 9, 2010
    Posts:
    6
    This looks amazing. Does this work with the free unity or only with pro?
    Is there any documentation i can read. I would like to know what this does. Like i have seen in demo when one shoot at something then that thing is affected in physics. Is this something that is implemented in to the asset, like a prefab or is this some cooding i have to do by my self?
    Another question i have. I have an idea about using a bow with arrows, is there some support for projectiles like that?

    I will buy this assets if it works on free unity.
     
  19. kevdotbadger

    kevdotbadger

    Joined:
    Sep 13, 2011
    Posts:
    82
    Works with both free and pro. The physics is built in. There isn't a physical bullet that appears when you shoot, all the shooting is done with ray casting. If the ray hits an object, it add velocity to it and makes it move.
     
  20. urawhat

    urawhat

    Joined:
    May 25, 2012
    Posts:
    13
    @dyrwoolf it is worth the money. works great, but make sure you first take the time to play around with it and understand the whole thing. I jumped right into it and was able to add into one of my existing games right away. I later found that knowing how it works is very important but everything is just like it is in the web demo and is fantasitc.
     
  21. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    I cannot agree more. This is a great asset, with a lot more potential! Its superb as it is, with so many features, and very easy to add into any app. The next update will add a couple more features such as calling a Damage function on the target, allowing you to actually cause damage.

    I have personally been able to integrate this into my project alongside the AI4Enemies and Toon Shader assets from the Asset Store, without any issues!

    Just take your time looking through the documentation, Ive read through it a couple of times now, going over the different components and how they function. It will all make sense soon enough!
     
  22. urawhat

    urawhat

    Joined:
    May 25, 2012
    Posts:
    13
    Mobile Version
    [​IMG]
    [​IMG]
     
  23. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    Looks good. Dont suppose you have a Mobile script you could post up for the controls? I need to convert mine over to mobile soon...
     
  24. dyrwoolf

    dyrwoolf

    Joined:
    Oct 9, 2010
    Posts:
    6
    I bought it and i must say its very cool. Just import my models and add physics to them and se the bullet marks on them when fireing on them is amazing. I havent been able to get the models to move on impact thou, but ist probably sust some settings to tweak.

    This seems really cool. Is there any roadmap for this project where one can read about futere realeases? (I havent found one)
     
  25. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    There is no roadmap as far as I can tell. Its just what the developer has been posting up on the forums.

    I dont know how much time the developer has to spend on this project, but if we could setup a roadmap, that would be quite neat. As its quite a clean system, im sure people would be able to look at the roadmap and start developing solutions themselves, and push them back over to the dev for an update. Id be happy to help out on this.

    Adam
     
  26. VisionPunk

    VisionPunk

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

    @dyrwoolf: I'm so glad you like the system! Regarding a roadmap: Since the asset is developed in my spare time I currently allow myself the luxury of never committing to features or announcing dates. Crazy as it seems this is an important part of my motivational "fuel" :)

    The good news: Your ideas are very interesting and important to me! I always listen to feature requests and bug reports. All feature requests get considered and some will get implemented down the line.

    Understandably this leaves the information vaccum of noone knowing what gets implemented next. I've been thinking of setting up a feature request billboard at some point.

    I still wouldn't commit to anything, but it would provide a decent idea as to what are the most requested features.

    @mimminito, urawhat dotty: thanks again for helping out in the forum lately!

    /Cal
     
    Last edited: Sep 24, 2012
  27. urawhat

    urawhat

    Joined:
    May 25, 2012
    Posts:
    13
    @mimminito
    In order to make a mobile version you will have to "Tweak" the vp_FPSCamera.cs
    Add to the public class:
    private Rect rpan;
    public Texture2D panimage;
    Add a void:
    void OnGUI()
    {
    rpan = new Rect(Screen.width-305,Screen.height-145,300,140);
    GUI.DrawTexture(rpan, panimage);
    }

    Within the void UpdateMouseLook:
    remark out the
    //m_MouseMove.x = Input.GetAxisRaw("Mouse X");
    //m_MouseMove.y = Input.GetAxisRaw("Mouse Y");

    Add within the void update just before the this.m_Delta:
    if (Input.touches.Length > 0)
    {
    int ipan = 0;
    while (ipan < Input.touchCount)
    {
    Vector2 fingerPos = Input.GetTouch(ipan).position;
    Vector2 RealFinger = new Vector2(fingerPos.x, Screen.height - fingerPos.y);
    if(rpan.Contains(RealFinger))
    {
    Vector2 delta = Input.touches[ipan].deltaPosition;
    float rotationZ = delta.x * sensitivityX * Time.deltaTime;
    m_MouseMove.x = invertX ? rotationZ : rotationZ;
    float rotationX = delta.y * sensitivityY * Time.deltaTime;
    m_MouseMove.y = invertY ? rotationX : rotationX;
    }
    ++ipan;
    }
    }
    else
    {
    m_MouseMove.y = 0;
    m_MouseMove.x = 0;
    }

    This will allow you to use a mobile device to use the camera movement controls.


    For the forward, left, right, backward modify the SimpleScript.cs
    Add:
    // IMAGES USED FOR MOBILE NAVAGATION
    public Texture2D jumpicon;
    public Texture2D forwardicon;
    public Texture2D backwardicon;
    public Texture2D lefticon;
    public Texture2D righticon;
    public Texture2D fireicon;
    public Texture2D switchgunicon;
    public Texture2D zoomicon;
    // RECT USED FOR THE CONTAIN
    private Rect rjump;
    private Rect rswitchgun;
    private Rect rfire;
    private Rect rforward;
    private Rect rbackward;
    private Rect rleft;
    private Rect rright;
    private Rect rzoom;

    Within the OnGui add:
    // JUMP ICON
    rjump = new Rect(Screen.width-130,Screen.height-210,48,48);
    GUI.DrawTexture(rjump, jumpicon);

    // SWITCH GUN
    rswitchgun = new Rect(Screen.width-200,Screen.height-210,48,48);
    GUI.DrawTexture(rswitchgun, switchgunicon);
    if (countDown >= 0)
    {
    iconDisabled = 1;
    if (Time.time > nextEvent)
    {
    nextEvent = Time.time + 1;
    countDown--;
    }
    }
    else
    {
    iconDisabled = 0;
    }

    rzoom = new Rect(Screen.width-268,Screen.height-210,48,48);
    GUI.DrawTexture(rzoom, zoomicon);

    // FIRE GUN
    rfire = new Rect(Screen.width-60,Screen.height-210,48,48);
    GUI.DrawTexture(rfire,fireicon);

    // FORWARD ICON
    rforward = new Rect(Screen.width-Screen.width+8,Screen.height-144,144,48);
    GUI.DrawTexture(rforward, forwardicon);
    // BACKWARD
    rbackward = new Rect(Screen.width-Screen.width+8,Screen.height-48,144,48);
    GUI.DrawTexture(rbackward, backwardicon);
    // LEFT
    rleft = new Rect(Screen.width-Screen.width+9,Screen.height-96,72,48);
    GUI.DrawTexture(rleft, lefticon);
    // RIGHT
    rright = new Rect(Screen.width-Screen.width+81,Screen.height-96,72,48);
    GUI.DrawTexture(rright, righticon);

    Within the Void update comment out everything and add:
    if(Input.touches.Length > 0)
    {
    int i = 0;
    while (i < Input.touchCount)
    {
    Vector2 fingerPos = Input.GetTouch(i).position;
    Vector2 RealFinger = new Vector2(fingerPos.x, Screen.height - fingerPos.y);
    // JUMP
    if(rjump.Contains(RealFinger))
    {
    m_Controller.Jump();
    }
    // ZOOM
    if(rzoom.Contains(RealFinger))
    {
    if(iconDisabled==0)
    {
    StartCountDown();
    if(switchzoom==0)
    {
    ZoomIn();
    }
    else
    {
    ZoomOut();
    }
    }
    }
    // FORWARD
    if(rforward.Contains(RealFinger))
    {
    m_Controller.MoveForward();
    }
    // BACKWARD
    if(rbackward.Contains(RealFinger))
    {
    m_Controller.MoveBack();
    }
    // LEFT
    if(rleft.Contains(RealFinger))
    {
    m_Controller.MoveLeft();
    }
    // RIGHT
    if(rright.Contains(RealFinger))
    {
    m_Controller.MoveRight();
    }
    // FIRE GUN
    if(rfire.Contains(RealFinger))
    {
    vp_FPSShooter shooter = m_Camera.CurrentWeapon.GetComponent<vp_FPSShooter>();
    if (shooter != null)
    shooter.Fire();
    }
    // SWITCH GUN
    if(rswitchgun.Contains(RealFinger))
    {
    if(iconDisabled==0)
    {
    StartCountDown();
    if(m_Camera.CurrentWeaponID<m_Camera.WeaponCount)
    {
    SetWeapon(m_Camera.CurrentWeaponID+1);
    SetWeapon(m_Camera.CurrentWeaponID);
    }
    else
    {
    SetWeapon(1);
    }
    }
    }
    ++i;
    }
    }
     
  28. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Awesome ! Thanks urawat.
     
  29. urawhat

    urawhat

    Joined:
    May 25, 2012
    Posts:
    13
    No, thank you!!
    I can email my latest version for you.
    What I did is added a bool for mobile or not. Then wrapped the keyboard or mobile version within the simple script and fpscamera script.
    Also coded the fire() within the fpscamera so you can move the gun while shooting when you move around within the gun icon.
    I almost have it working just as if you were using the keyboard and mouse but all in a mobile.
     
  30. Pyronious

    Pyronious

    Joined:
    Oct 14, 2009
    Posts:
    3
    Thank you for the wonderful asset. I have a couple issues:

    1. When I turn on the "HDR" checkbox for the FPSCamera GameObject, the gun renders but the rest of the scene goes black.

    2. When I apply the "SunShafts" image effect (from Standard Assets) to the FPSCamera GameObject, the effect is not rendered.

    Any thoughts or workarounds I might try?

    Thanks again!
     
  31. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
  32. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    @Pyronius: It seems you are using Unity Pro? Interestingly, I have only just started to get reports of trouble with image effects (the asset was in fact developed on Unity Indie). This is something I will give a high piority.
     
    Last edited: Jun 13, 2012
  33. okba28mca

    okba28mca

    Joined:
    Aug 22, 2010
    Posts:
    65
    I have a question i'm confused this is a completely an Fps kit ? or just added a motion to the camera ?
    cause i already do my Fps system ( shooting . decal effect , weapon animation , pick and drop weapons and ammo ..ect)
    but my camera still not interact with the movement.

    So in my situation , can your product help me to complete my project ?
     
  34. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    This is not a full FPS Starter Kit, like you can find in other Assets on the store.

    This is, an advanced and procedural FPS Camera kit, with Weapons and other features.

    What does your project need to finish?
     
  35. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    @okba28mca: Ultimate FPS Camera is designed to be very open ended. It consists of various components that you can choose to include or leave out. So in your case it sounds like you only need the camera motion: then just add the camera system to your player.

    The asset also includes a weapon component and a projectile component with decals and particles but you don't have to use them. For example, a Roman Gladiator FPS may need a weapon component but not a projectile component.
     
  36. okba28mca

    okba28mca

    Joined:
    Aug 22, 2010
    Posts:
    65
    @mimminito : Hello thank's for your answer! i just want to make my FPS realistic as i can, I do some kickback and i shack my camera little bit but i don't really happy with the result and this looks as a solution !
    @VisionPunk : i have more detaille hope your product is compatible with it :
    -I don't use the Fps walker from unity standard asset i did my own
    - to preventing the gun from going throw the walls i used 2 cameras with culling mask one witch is the Main its broadcast everything except the gun and the second witch is the weapon camera its broadcast just the gun nothing else !!
     
  37. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    This asset comes with its own FPS walker based on the Unity CharacterController. The FPSCamera component is separate and you should be able to use it with any FPS walker that is based on the Unity CharacterController, but I have no idea how hard it will be to make it work with your own FPS walker.

    This is also done by the FPSCamera in the package. I think there may be quite some overlap between your system and mine, and you may have to make a choice as to what parts of what system will work best for you.

    Here are the most central components of this asset and how they correlate:

    • vp_FPSController: Walker based on the Unity CharacterController. Can be used without any of the other classes but it won't rotate the camera by itself.
    • vp_FPSCamera: Animates motion of the camera and handles mouselook and smooth mouse filtering among other things. Should work without any of the other classes. Is not dependent on vp_FPSController but will need a Unity CharacterController in a parent gameobject.
    • vp_FPSWeapon: Animates motion of the weapon. Needs a vp_FPSCamera but can be used without a vp_FPSShooter.
    • vp_FPSShooter: Handles recoil, spawning of projectiles and firing sound. Needs a vp_FPSWeapon. Is designed to spawn vp_Bullets, vp_MuzzleFlashes and vp_Shells but may omit them, or may spawn any other gameobjects in their place.
    • vp_Bullet: A hitscan projectile class that handles raycasting and spawning of decals and impact particles. Independent of everything else.
    • vp_MuzzleFlash: Renders an additive, randomly rotated, fading out muzzleflash. Can also be used independently of the other classes but requires the "Particles/Additive" standard Unity shader.
    • vp_Shell: A class for ejected shell casings with rigidbody physics adapted for more realistic behavior. Independent of everything else.

    I hope this gives some overview. Let me know if you need more info.

    /Cal
     
    Last edited: Jun 13, 2012
  38. okba28mca

    okba28mca

    Joined:
    Aug 22, 2010
    Posts:
    65
    So u tell me that all the components are separate ? No relation between em? that will be nice
    Also can u tell me how you did prevent the gun from going throw the walls if you can off course .
    i'm more interesting on this now!!
     
  39. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Not really, as you can see there are some relations between some components. But everything is fairly modular.

    Basically the same solution as you used, it seems.
     
  40. okba28mca

    okba28mca

    Joined:
    Aug 22, 2010
    Posts:
    65
    OK; man , next week i grues i'll buy this hope it will work for me !! hope it's not have issue with image effects .
    you know we have a limited budget and there is a lot of good stuff around we looking for .
    by the way did you do a shaders pack ?
    regard
    Okba.
     
  41. GoMakeWorlds

    GoMakeWorlds

    Joined:
    Mar 21, 2012
    Posts:
    8
    @Pyronious had the same issue... my solution was not that difficult

    The second camera HDR is off by default. You have to add this line to the sample script. I think you need to place it in the camera class for it to work properly. and just set the boolean=true; that will fix HDR.

    effects it seems need to also be placed into the second camera I have not done any work to fix the problem yet.

    @Vision hi, Cal about the effects on the second camera, I think a simple solution might be creating an empty object that would hold the effects so they can be edited. Then when the camera is created at run time it just inherits those components with all the settings. I don't know how that would make scripting effects work. just a thought
     
  42. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    234
    check HDR on the weapons camera...fixes the black screen, but you won't see the image effects unless you disable the weapon camera.

    I'm trying to also find a fix for the image effects to work.

    untested, but I think a "bad" work around would be to render the weapon into a texture and then draw that texture on the screen:
    http://forum.unity3d.com/threads/4541-Make-Inset-Camera-Transparent
    however I don't think the weapon will be effected by image fx...

    The current system to keep weapons from clipping makes using pro effects not possible....
     
  43. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    234

    *typing while you posted :)
    Problem with effects added to weapons camera, I think some need the depth info that is cleared...some will work
     
  44. nielo

    nielo

    Joined:
    May 13, 2012
    Posts:
    10
    I had a nice response typed out explaining how to go about getting around this, but unfortunately my laptop decided to randomly shut down, so I lost it.

    In short, image effects are applied to the top camera, which in this case is the weapon camera - which gets generated.

    The way I solved this was to create a camera object and a property on vp_FPSWeapon to assign the camera to and instead of generating a camera the weapons then use this camera.

    I've got a hectic milestone to achieve for tomorrow, otherwise I would have provided (and in fact did) more info. I'll respond more in depth after we've successfully achieved our milestone tomorrow.
     
  45. hanso

    hanso

    Joined:
    Jun 18, 2012
    Posts:
    4
    hey!

    First of all, thanks for this awesomeness! I'm pretty sure i will use it for several game projects, it's simply amazing!
    I'm a student and pretty new into unity3d, so I have just i little rookie question and I'm sure it's easy for you guys to answer this.
    I my game project i want to use the ultimate FPS Camera / Player WITHOUT any guns, and also no shooting / 3d arm&gun.
    How can I set this thing up?

    If I'm just deleting weapons in my FPSPlayer-object, i get this error:

     
  46. kevdotbadger

    kevdotbadger

    Joined:
    Sep 13, 2011
    Posts:
    82
    Why don't you just use the FPplayercontroller prefab with unity if you want just move around?
     
  47. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hey, To achieve what you want (an FPS player with no weapons) you should just add the FPSPlayer prefab to a scene and delete its weapon objects (breaking the prefab connection). I'm not sure why you get that error but you may have set "Persist play mode changes" to "ON" before you deleted the objects?

    Alternatively, you can follow the tutorial on page 9 of the manual, "Creating an FPSPlayer from scratch" and ignore the parts about adding a weapon and a shooter. Hope this helps.
     
  48. hanso

    hanso

    Joined:
    Jun 18, 2012
    Posts:
    4
    thanks man! Now it's working perfectly. (did it with the manual).
    @dotty, FPplayercontroller isn't that smooth like this one (f.ex. the mouse look) and i get a really annoying but there sometimes with jumping around with my player.
     
  49. hxxhui

    hxxhui

    Joined:
    May 10, 2012
    Posts:
    9
    @cal:

    Glad to know you will release a "game ready" version with more features. That really help me a lot. I can keep focus on authencative networking. when will the new release available on assetstore?

    And,one more questions for help:
    As bullet is not really ejected and a raycast is used instead, how can I show the effect of a bullet trajectory? just like a tracer bullet.

    Thanks
     
  50. smerf123

    smerf123

    Joined:
    Aug 26, 2011
    Posts:
    102
    First of all I would like to say thank's for this great product.

    I am however having a probably a very simple problem which I cannot figure out.

    So I followed the tutorial in the documents exactly
    This:
    That works great. But if I save the scene and quit unity or load another scene and comeback to it later, The shooting no longer works but everything is the same as it was when I saved it.
    How can I sort this out

    I'm using the latest unity and the latest Ultimate FPS Shooter.
     
Thread Status:
Not open for further replies.