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

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711

    Cool :)
     
  2. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    No problem. Thanks for buying! That really helps in getting this developed further.
     
  3. J-F

    J-F

    Joined:
    Nov 8, 2012
    Posts:
    101
    Is there a video tutorial for making own guns? I have tried using my earlier models and i had so much trouble with them. Also, how does this support 2 arms. For example: A rifle which is held with both arms?
     
  4. MLow

    MLow

    Joined:
    Mar 2, 2011
    Posts:
    35
    Copy pasta the guns down the chain, all under fpscamera, the script looks at all children as guns, then you use the setweapon(int) method to set which to use, alphabetically. So 1Pistol is before 2Pistol. As for meshes, make your own 2 hands mesh and have them gripping the gun? It's just a mesh, this script does no animation on them(you can of course add that in yourself). I have this script integrated with the NGUI inventory example and it only took like 20 minutes. It's very well documented so if you want to add things or change things I suggest you just read his code, it's very clear to understand how things are working. Just start reading from FPSPlayer on the root object, it references other objects down the chain and it's pretty easy to follow a function to what it does to the other objects.
     
  5. J-F

    J-F

    Joined:
    Nov 8, 2012
    Posts:
    101
    How i made my weapon is that the gun and both arms are the same object. but when i try this model out with the FPS Camera. the left arm doesn't seem to be fixed, When i move the camera fast i can see the left arm going trough the camera. I also tried to put the pivot in the chest but then both arms will go trough the camera when i move fast.
     
  6. MLow

    MLow

    Joined:
    Mar 2, 2011
    Posts:
    35
    EDIT: maybe it's not state related if your just moving the camera with the mouse and it's messed up.

    I haven't actually tried anything other than boxes for weapons yet, so I'll get back to you when i get a chance to throw a mesh in there. I'll shoot for a test tonight, I'm leaving for work soon so that's +6h from now give or take. GL if you try some more on your own.
     
    Last edited: Nov 10, 2012
  7. J-F

    J-F

    Joined:
    Nov 8, 2012
    Posts:
    101
    Nvm i got it working. just put the camera little further and the pivot point has to be set between the shoulders.
     
  8. MLow

    MLow

    Joined:
    Mar 2, 2011
    Posts:
    35
    I downloaded a scar model from turbosquid for free, tested it out and after some tweaking on position it works fine. So I'm glad you figured it out cause it took me a while to make the sights on the model line up with the center of the screen(my project doesnt use crosshairs)
     
  9. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70

    Hey bubbalovesponge,

    Could you share how you did this?

    Thank you.
     
  10. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    Hey urawhat.

    Can you please tell me where this is? Add within the void update just before the this.m_Delta:

    I do not see that. Is it in the void UpdateMouseLook?

    Thanks for any help.

    --

    Vision Punk

    This is an incredible asset. Thank you for all your work involved in it.

    Incredible.
     
  11. bubbalovesponge

    bubbalovesponge

    Joined:
    Nov 8, 2012
    Posts:
    69

    Urawhat is also me.

    Since this is Vision Punks stuff, I do want to get in trouble posting my modified version of his code or attach a compiled APK for testing, but for me it works great.

    This forum decided I needed a new name. LOL
    (Guess I got in trouble for posting revised code)

    Anyway, with the new version of Ultimate FPS the script I posted in the past needs recoding, but not too much.

    I will give you the low down though....
    vp_FPSPlayer.cs
    vp_FPSWeapon.cs
    vp_FPSController.cs
    vp_FPSShooter.cs
    vp_FPSCamera.cs
    Comment out all refernces to Input.GetKey.... and also Input.GetMouse.....

    Make a new .cs (I called mine vp_FPSMobile.cs). With this you can then make a mobile version of his awesome asset.
     
    Last edited: Nov 13, 2012
  12. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    I hope you guys are making good asset store sales and keep developing this further, what you got here is AWESOME and probably the best feeling unity first person set up I've tried thus far...

    It'd be sweet if you continued to expand this to include touch based and gamepad interface elements as well. So then people could use dual joystick game pad, or dual joystick game-pads on screen. Or some other scheme.
     
  13. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
  14. bubbalovesponge

    bubbalovesponge

    Joined:
    Nov 8, 2012
    Posts:
    69
    Well Vision, I have made a full iOS version that handles all the functions for all movement, firing, jumping, zoom, etc.
    If you would like I can share with you my code and also if you like I can post a mobile droid APK here for users to test and see how it functions.


    How I modified your code is that the gun firing is also associated to gun aim movement along with standard movements you would have with the mouse.
    The WSAD are controlled on the left side along with diragonal control as well.
    I also added a bullet count for each active weapon on the top right.

    Only thing i have left on my mobile version is adding some zombies to attack and kill.. LOL
     
  15. eawerbaneth

    eawerbaneth

    Joined:
    Nov 14, 2012
    Posts:
    1
    Hi,

    In the game I'm working on, there is a note-taking system where you can bring up a notepad where the player will need to regain his mouse cursor to click around and scroll through notes. The problem I'm having is that the only way I've been able to get the mouse cursor back is by hitting escape. I am disabling all of the FPS components when I bring up the notepad and setting Screen.showCursor to true, but that's not giving me the mouse back.

    Any ideas on how to automatically re-enable the mouse? I wasn't able to find anywhere in the FPS scripts where this was handled overtly (I'm not even sure which script is even handling it).

    Thanks so much!
     
  16. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    That would be very helpful. I'm pretty new and do not know how to code a joypad to work with Ultimate FPS.

    I've gone through all the links quoted by Vision as well as the entire thread for help. I was under the impression from a review on the Asset Store that there were only 4 lines of code to change to get it working in iOS.
     
  17. bubbalovesponge

    bubbalovesponge

    Joined:
    Nov 8, 2012
    Posts:
    69
    I'm farily new at this as well, but so worth taking the time to rip apart and learn unity and scripting...

    Took me a while to get this down just right since there are like several different ways to do a touch pad movement control system but I will give you my tutorial (granted I'm sure others will say this is wrong, but works awesome for me).

    First off, JavaScript is good, but I found C# to be better and faster. Really take time to learn c#.

    To begin with a touch screen movement control you first need to understand that more then one finger will be used on the iOS or Droid.

    So I did this:
    if (Input.touches.Length > 0)

    Then a while statement with the number of greezy fingers.
    int ipan = 0;
    while (ipan < Input.touchCount)


    Next, is to find where those fingers are at. Note mobile screens with unity are reversed so you need to flip it in the code for the height Screen.height - fingerPos.y.
    Vector2 fingerPos = Input.GetTouch(ipan).position;
    Vector2 RealFinger = new Vector2(fingerPos.x, Screen.height - fingerPos.y);

    OK, now that we got that done, next we need to tell the screen just where (if you want to to) to even register and use those little fingers on the screen.
    For this, I used the if(rpanel.Contains(RealFinger))

    rpanel is defined as a Rect with a 2D Texture.
    private Rect rpanel;
    I put mine on the bottom right of the screen.
    Within the OnGui()
    rpanel = new Rect(Screen.width-305,Screen.height-145,300,140);

    now, this will not be seen so in order to see it you need to assign a texture.

    public Texture2D movepanel;

    Also within the OnGui()
    Texture2D movepanel = Resources.Load("move_2", typeof(Texture2D)) as Texture2D;
    GUI.DrawTexture(rpanel, movepanel);

    move_2 is an image. In order to use an image, create a Resources folder within the Assets folder
    Assets\Resources\move_2.png



    So in short, assign to varibles at the beginin of the class:
    public class vp_FPSCamera : vp_Component
    {
    private Texture2D movepanel;
    private Rect rpanel;

    Have a OnGUI() and create the Rect along with the image
    void OnGUI()
    {
    rpanel = new Rect(Screen.width-305,Screen.height-145,300,140);
    Texture2D movepanel = Resources.Load("move_2", typeof(Texture2D)) as Texture2D;
    GUI.DrawTexture(rpanel, movepanel);
    }


    Within the UpdateMouseLook or Update() add the movement controls.
    protected void UpdateMouseLook()
    {
    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(rpanel.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;
    }
    }
     
    Last edited: Nov 15, 2012
  18. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi bubba / urawhat,

    Big thanks for taking the time to post your code. I'm sure it will be of help to many people. I agree with you on C#. It's a very simple and powerful language. There seems to be a misconception that JavaScript is easier which arguably isn't the case.

    Can't wait to see it =)
     
  19. VisionPunk

    VisionPunk

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

    It sounds like you want to do something similar to what's done in the demo, where the mouse cursor can be disabled and reenabled by pressing Enter. What you need for this is the "LockCursor" property of vp_FPSPlayer (rather than using "Screen.showCursor" directly). You can study how this works in "vp_FPSDemo2.cs -> Update".

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

    /Cal
     
  20. VisionPunk

    VisionPunk

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

    Yeah mobile is a hot candidate for sure. I might look into gamepad issues at some point if demand grows.

    Cheers

    /Cal
     
  21. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    @techmage
    +1

    No doubt about that. I'm waiting ;)
     
  22. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    572
  23. CharlieH

    CharlieH

    Joined:
    Nov 16, 2012
    Posts:
    6
    Hi,

    Awesome work, impressively polished!

    I am trying to instantiate the FPSPrefab from script in Unity 4 and it looks like there is a small issue.
    The function SwitchWeapon() is called from vp_Timer.Execute() before the vp_FPSWeapon.start() function.
    --> m_Pivot and some other stuff are used but not initialized by start() (which is called after).

    If you place the FPSPlayer prefab directly in the level, the start function is called first.

    Any idea on how to fix this?
    Thanks!

    Charlie
     
  24. bubbalovesponge

    bubbalovesponge

    Joined:
    Nov 8, 2012
    Posts:
    69
    I have Zombies!!!
    Anyways, i will turn off my mobile so the normal keyboard mouse functions and post my demo for critics.

    But I wanted to add some code notes that I thought would help you guys.
    First off. Showing the number of bullets left in your gun.
    Within the vp_FPSCamera.cs

    Do ths following:
    Create folder Assets\Resources
    add these to that folder:
    http://microcyb.com/Single-Bullet-icon.png
    http://microcyb.com/Antimony%20Funk.ttf

    Add new varibles/objects.
    public class vp_FPSCamera : .........
    {
    public Texture2D bullet;
    private Rect rbullet;
    public GUIStyle style;
    public Font fontNormal;

    void OnGUI()
    {
    if (CurrentShooter != null)
    {
    rbullet = new Rect(Screen.width-40,Screen.height-Screen.height+32,32,32);
    Texture2D bullet = Resources.Load("Single-Bullet-icon", typeof(Texture2D)) as Texture2D;
    GUI.DrawTexture(rbullet,bullet);
    GUIStyle myStyle = new GUIStyle();
    fontNormal = Resources.Load("Antimony Funk", typeof(Font)) as Font;
    myStyle.font = fontNormal;
    myStyle.normal.textColor = Color.black;
    myStyle.alignment=TextAnchor.MiddleRight;
    GUI.Label(new Rect(Screen.width-95,Screen.height-Screen.height+30,60,60), CurrentShooter.AmmoCount.ToString(),myStyle);
    myStyle.normal.textColor = Color.white;
    GUI.Label(new Rect(Screen.width-93,Screen.height-Screen.height+32,60,60), CurrentShooter.AmmoCount.ToString(),myStyle);
    }
    }

    This will add a nice bullet icon and show the number of bullets left in the gun you have active.
     
  25. bubbalovesponge

    bubbalovesponge

    Joined:
    Nov 8, 2012
    Posts:
    69
    Next one I find useful because you don't always want those silly bullet mark decals showing. Just took it out of the VP_damagehandler

    Create a New CS file called vp_RemoveBullets.cs

    /////////////////////////////////////////////////////////////////////////////////
    //
    // vp_RemoveBullets.cs
    // NOT © 2012 Microcyb. Add on for VisionPunk Ultimate FPS Camera
    //
    // description: Remove the bullet decals. Just add it to the gameobject
    //
    /////////////////////////////////////////////////////////////////////////////////

    using UnityEngine;

    public class vp_RemoveBullets : MonoBehaviour
    {
    void Update()
    {
    RemoveBulletHoles();
    }

    ///////////////////////////////////////////////////////////
    // removes any bullet decals currently childed to this object
    ///////////////////////////////////////////////////////////
    protected void RemoveBulletHoles()
    {
    foreach (Transform t in transform)
    {
    Component[] c;
    c = t.GetComponents<vp_Bullet>();
    if (c.Length != 0)
    Object.Destroy(t.gameObject);
    }

    }
    }
     
  26. bubbalovesponge

    bubbalovesponge

    Joined:
    Nov 8, 2012
    Posts:
    69
    This one I created for my Zombie to show being hit and spatter blood.
    So when my zombies are hit with a bullt I remove the stnard bullet decal and instead created a blood emitter to sho the zombie getting shot and blood effect.

    /////////////////////////////////////////////////////////////////////////////////
    //
    // vp_HitEffect.cs
    // NOT © 2012 Microcyb. Add on for VisionPunk Ultimate FPS Camera
    //
    // description: Create a new hit effect to the game object
    //
    /////////////////////////////////////////////////////////////////////////////////

    using UnityEngine;
    public class vp_HitEffect : MonoBehaviour
    {
    public GameObject DeathEffect = null; // gameobject to spawn when object dies.
    public float m_CurrentHealth = 0.0f; // current health of the object instance
    public float Health = 10.0f; // initial health of the object instance, to be reset on respawn

    public float MinDeathDelay = 0.0f; // random timespan in seconds to delay death. good for cool serial explosions
    public float MaxDeathDelay = 0.0f;
    // un comment to add character animation
    // public Transform AICharacter;
    // public AnimationClip DeathAnimation;
    // void Start ()
    // {
    // if(AICharacter){}
    // else AICharacter=transform;
    // }

    void Awake()
    {
    m_CurrentHealth = Health;
    }

    public void Damage(float damage)
    {
    if (!enabled || !gameObject.active)
    return;

    m_CurrentHealth -= damage;
    if (DeathEffect != null)
    {
    Object.Instantiate(DeathEffect, transform.position, transform.rotation);
    }

    if (m_CurrentHealth <= 0.0f)
    {
    vp_Timer.In(Random.Range(MinDeathDelay, MaxDeathDelay), Die);
    return;
    }
    }

    public void Die()
    {
    // uncomment to add character animation.
    // if (!enabled || !gameObject.active)
    // return;
    // AICharacter.animation.CrossFade( DeathAnimation.name, 0.1f);
    // }



    }
     
  27. suctioncup

    suctioncup

    Joined:
    May 19, 2012
    Posts:
    273
    Hello,

    So far I am extremely impressed with this, but I would like to know how to zoom with my weapon!

    How on earth do I set up zooming (ADS) with the ultimate FPS camera? Help?
     
    Last edited: Nov 17, 2012
  28. lusho_games

    lusho_games

    Joined:
    Jun 4, 2011
    Posts:
    63
    Hi, I bought the uFPS a few days ago, and I love it so far.

    Just got a quick stupid question,(I already check the manual).

    How do you use it with animations?, not just the procedural ones but the ones you do manually in your animation software.

    Thanks!.

    here are some screenshots:



     
  29. lusho_games

    lusho_games

    Joined:
    Jun 4, 2011
    Posts:
    63
    Nevermind, I already figure it out. I had to do a script to use the animation.

    Sorry for bothering. This was answered in page 9.
     
  30. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    The thing I've really put my back into this time is a sliding feature, something that has been requested by a lot of people. Solutions have been discussed earlier in this thread, but this implementation is more advanced and fully integrated into the system. I'm also working on a number of other features, some of which will make it into the release. I'll post a complete list here when it's getting closer to release.

    /Cal
     
  31. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Thanks for reporting this, Charlie. I'll look into it this weekend and get back to you within a couple of days.

    /Cal
     
  32. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Cool stuff :)
     
  33. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    That looks really awesome, 3uhox. What's the game about?

    /Cal
     
  34. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    I'm kinda a noob at unity3D, but I'm trying to combine this with the unity networking example. My problem is that when one player moves the other players connected to the server also move. Does anyone know how to fix this?
     
  35. VisionPunk

    VisionPunk

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

    I haven't looked into multiplayer for this yet, but I'd have a close look at the Photon network engine instead. I have a feeling it is easier to work with, has a lot of momentum right now and is very expandable (but I may be wrong). There are a few Unity tutorials for it, check this out: http://doc.exitgames.com/photon-cloud/Unity_Demos/

    Also, there has recently been a discussion in this thread on using this asset with the regular Unity networking. I'm not sure how it worked out for the guys involved but see this post and the discussion in the pages that follow.
    http://forum.unity3d.com/threads/12...era-RELEASED?p=1077372&viewfull=1#post1077372

    Cheers

    /Cal
     
    Last edited: Nov 18, 2012
  36. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    Hey bubba,

    Thanks for the help and the excellent tutorial.
     
  37. lusho_games

    lusho_games

    Joined:
    Jun 4, 2011
    Posts:
    63

    Thanks!.

    The idea I have for this game is like: Wizards Vs. Monsters, Dark Souls in FPS but without rpg elements and stats, just a few spells.

    There will be a number of locations on a semi open world terrain, you have to visit them all, clear from foes, activate switches, and do some stuff before you can gain access to a boss area.

    Some other things, like multiplayer, are beyond my current knowledge, but I would love to.

    Here's a video:

    http://youtu.be/RDmpU-505VE
     
  38. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    I gotta say, that looks incredible! Can't wait to see how this progresses.
    Anyone else have things to show that you made with Ultimate FPS Camera, please share. I'm very curious :)

    /Cal
     
  39. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    I've done a mod on the crosshair and weapons system (thus I can't update package anymore rofl):
    http://www.youtube.com/watch?v=jKjWTuqiVhA

    Testing interactions with objects, stuff have changed from this bit old test:
    http://vimeo.com/47868127
     
  40. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    I think I've figured out how to make multiplayer work with photon. After examining some of photon's sample projects, I figured out that I have to use the photonview component and the line of code

    if (photonView.isMine)

    Now, I just have to figure out where to put these if statements...
     
  41. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
  42. J-F

    J-F

    Joined:
    Nov 8, 2012
    Posts:
    101
    I don't know why but the camera can't see flares. Have you any idea how to fix this?
     
  43. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Just bought and like it :)

    I hope for a mobile version from "you" too.
    Please do not post the links again ;)

    Oh and in your demo i think i found something that should be changed in some way.
    When i use the Mech or Dino and hold the trigger the Mech cage is jittering more and more until it is gone away.
    Maybe this can be changed so that the cage is jittering only until a special amount and not more.
     
    Last edited: Nov 20, 2012
  44. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
  45. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    LOL, but I like posting the mobile links! ;)

    Thanks for reporting. If I get you correctly you mean that you press fire continuously and the recoil on the mech cockpit shakes more and more until it goes out of view? That might indicate that there is some kind of framerate dependence bug. What is your framerate when this happens? Anyone else experiencing things like this?

    (and thanks for buying btw ... )

    /Cal
     
  46. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi again Charlie,

    I have verified this issue. i.e. in Unity 4 when FPSPlayer is instantiated from script (and not placed in the scene from start) the app crashes because the camera Init method is run before the weapon Start method. That's not supposed to happen and I'll add this to the buglist. In the meantime, I can think of 3 ways around it.

    1. By script: Remove the call to 'SetWeapon' in 'vp_FPSCamera.Init'.
    2. In the project: Go To "Edit->Project Settings->Script Execution Order" and add 'vp_FPSCamera' to the list after the Default execution time (note that you may have to restart the game a couple of times before this takes effect).
    3. By content: Keep the player in the scene from the beginning, but set it inactive in the editor (setting an FPSPlayer active / inactive in the hierarchy works in Unity4 - as opposed to Unity3.x where the child active states would become messed up). Keep a script reference to the scene object. When you want to instantiate the player just do 'SetActive(true)' on the gameobject.

    Thanks again for reporting this.

    Cheers

    /Cal
     
    Last edited: Nov 21, 2012
  47. SobhanNina

    SobhanNina

    Joined:
    Mar 15, 2010
    Posts:
    42
    Hey VisionPunk , am one of your first Customers , well , am so happy with my purchase , am working on a project which i have to face with some Conditions that am afraid of them !!!!

    We are working on a FPS Game , which must have the Ability of Bullet Penetration (Bullet Makes Hole in Body and Come out from other side ... --creepy--) (Penetrate Cement Blocks , Wood , Metal , ... Everything Penetrable)
    and Gonna have a Bullet Camera , Which Gonna Track Bullet When it Comes Out of the Barrel till it Heats the Target
    and of course a Target(Enemy) Dead Camera (Like Max Payn) e.g you shoot , Camera Tracks the Bullet , when Bullet Reach the Target (Hit it) penetrate it and Camera Gonna Return to the player (first place).
    and this all gonna be in SLOW MOTION

    Is your Kit Capable of handle this ? Is this a Chance , that you can Add this Features to the Kit ?
    if adding this required additional Requirements please "PM" me ...
    and am in hurry !!!
     
    Last edited: Nov 21, 2012
  48. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    Hi SobhanNina, I'm so glad to hear that :)

    Unfortunately I am not planning to include bullet penetration logic because it is a very genre specific feature and I'm keeping the asset as generic as possible (see this explanation).

    By default, UFPS uses hitscan bullets, which does not involve an actual moving object.

    However, you should be able to achieve a basic penetration feature quite easily by modifying vp_Bullet.cs to use RayCastAll instead of RayCast. In this way, you could track all objects hit, reduce some penetration force variable for each surface penetrated, in order (depending on surface hardness ofcourse), place a decal on each hit point, and stop the bullet if its penetration force runs out. However, I don't think this alone will work for you because of the remaining features you have in mind.

    Btw, there is an excellent discussion on bullet penetration mechanics here:
    http://answers.unity3d.com/questions/188421/bullet-penetration-mathmathics.html

    In this case, I imagine one would pre-trace the route of the bullet using the above method before firing the bullet, then interpolating an actual projectile mesh along the pre-calculated path (followed by the camera).

    This requires some intricate gameplay and camera coding that will be specific to your game. You will want to design this yourself to be in full control.

    This is actually a feature (or rather a bugfix) that is planned for Ultimate FPS Camera. Currently I've had some reports that UFPS doesn't handle non-1 timescales very well. It should, and I will fix this in an upcoming version. Can't say when though.

    Hope you'll sort this out!

    -Cal
     
  49. Moonlight

    Moonlight

    Joined:
    Jun 7, 2010
    Posts:
    41
    I am so glad to hear this, because I was just messing around with this for a bit and realized that the pause game script that I had made (to work with unity serializer) was giving me this err:



    Code (csharp):
    1. transform.rotation assign attempt for 'DemoFPSPlayer' is not valid. Input rotation is { NaN, NaN, NaN, NaN }.
    2. UnityEngine.Transform:set_rotation(Quaternion)
    3. vp_FPSCamera:Update() (at Assets/UltimateFPSCamera/vp_FPSCamera.cs:275)
    4.  
    5. transform.rotation assign attempt for 'FPSCamera' is not valid. Input rotation is { NaN, NaN, NaN, NaN }.
    6. UnityEngine.Transform:set_rotation(Quaternion)
    7. vp_FPSCamera:Update() (at Assets/UltimateFPSCamera/vp_FPSCamera.cs:282)
    Hope it gets fixed... because being able to pause a game (and save it) is kinda important, lol.:rolleyes:

    I have noticed a few errors in general when working with unity serializer, such as the player not keeping the selected weapon, not being rotated in the same direction that they should be, and other small things, but as far as I can tell, using this system, that can't really be helped. I was wondering if you could take a look at that and maybe find a fix, because there isn't any errors or bugs that pop up in the console, that's just they way it acts.:confused:

    Great product and system all together!:)
     
  50. jrkienle

    jrkienle

    Joined:
    Apr 14, 2012
    Posts:
    71
    Hey VisionPunk. Could you possibly add photon networking support to the next release of the script?
     
Thread Status:
Not open for further replies.