Search Unity

Realistic FPS Prefab [RELEASED]

Discussion in 'Assets and Asset Store' started by Deleted User, Apr 5, 2013.

  1. AusAndrew19

    AusAndrew19

    Joined:
    Jun 6, 2012
    Posts:
    16
    @Azuline Suggestion for Update, If your swimming in water hide the weapon and disable from firing it because im sure in real world the weapon doesn't have a muzzle flash underwater yet sustain rapid fire hehe You are creating one hell of a KIT and i couldn't thank you more then enough.
     
    Last edited: Jul 20, 2013
  2. Deleted User

    Deleted User

    Guest

    Thank you MoHoe, lots of fixes and additions for this version :) Much improved over 1.16.


    No problem inglipX! To disable bullet time, you will be able to change the Enter Bullet Time keyCode assignment in FPSPlayer.cs to "None". As for fists and a game saving method, we will definitely look into these ideas for a future update.


    Sorry about that snowboardkid, it might of had something to do with Chrome not taking https:// addresses. Here is an updated link to the web player you can try.


    Hi NessimOnair, Here is a link to a discussion about adding new models for NPCs in version 1.16. For adding new NPC meshes in version 1.17, the process is simpler. This is the guide from the updated 1.17 docs:

    The first step to adding a new NPC is dragging an existing NPC object from the project library from either Assets\!Realistic FPS Prefab Files\~Demo Scene Assets\~ZombieNPC\Objects for the zombie NPC or from Assets\!Realistic FPS Prefab Files\~Demo Scene Assets\~AlienNPC\!Objects for the robot NPC. Then you can click on the RobotNPC or ZombieNPC object in the hierarchy view and select Break Prefab Instance from the GameObject menu so you won’t accidentally overwrite the original.

    Then you can expand the hierarchy of the duplicated NPC in the Hierarchy window and delete all of its child mesh rendering objects. After you’ve done this, you can locate the new NPC character mesh in the project library, and drag it over the duplicated root NPC object. The animation component of the duplicated NPC object can also be deactivated by checking the box in the upper left of its component window.

    Now we want the AI.js component of the root/parent NPC object to use the animations of the child character mesh you just added to this object. To do this, expand the root NPC object’s hierarchy and drag the child mesh object over the Object With Anims field of the AI.js component. Now, looking in the 3d scene view, make sure that the new NPC character mesh is the right height and fits roughly inside the bounds of the character controller capsule of the root NPC object. If the NPC mesh is too small, you can try increasing its Scale Factor in its Animation Import Settings. You’ll also want to make sure that the imported character mesh has these animations defined in the Animations section of the mesh’s Animation Import Settings: shoot, idle, walk, run (case sensitive). When you test the scene, your new NPC should animate correctly and chase after the player.

    So for version 1.16, the AI scripts, character controller, and audio source need to be attached to the same object the character mesh's Animation component is attached to. In version 1.17, you just need to drag the character mesh over a duplicated NPC object, delete the original NPC's child mesh objects, drag the new mesh over the Object With Anims field of the AI.js component, and align the new character mesh size with the capsule collider. If you have any more questions about this, please let us know.


    Those are some good ideas, AusAndrew19! In 1.17 it will be possible to set the fireableUnderwater var of WeaponBehavior.cs to false to prevent a weapon from firing underwater. We will also add an option to hide the weapon while underwater in a future version. Thanks for your feedback!
     
  3. Z00MBY_Alex

    Z00MBY_Alex

    Joined:
    Jul 10, 2013
    Posts:
    7
    Hey Azuline!
    You can do, to AI could walk across the dead body, and not to rest in him? Each update must be bought separately in the shop or they will load automatically?
     
  4. Deleted User

    Deleted User

    Guest

    Hi Z00MBY_Alex, NPCs will walk through rag dolls in the new version. This was achieved by adding a statement in FPSPlayer.cs that sets the NPC and ragdoll layers to ignore collisions.

    New updates are applied to the existing asset already on the store, so they all will be free if you've purchased the Realistic FPS Prefab. From my understanding, asset updates aren't downloaded automatically from the asset store, so you can watch the version number on the store page or this thread to find out when the update is live. Then you can go to the download manager and download the asset again and import it into a new or existing project, making sure to backup your original project if you've made a lot of changes. Hope that answers your questions!
     
    Last edited by a moderator: Jul 22, 2013
  5. Z00MBY_Alex

    Z00MBY_Alex

    Joined:
    Jul 10, 2013
    Posts:
    7
    Thanks for the reply!

    I bought in a shop Realistic FPS Prefab, but he's version 1.16. How do I get the version 1.17???
     
  6. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    It's in the asset store. Just popped up an hour or so ago for me.
     
  7. Deleted User

    Deleted User

    Guest

    Version 1.17 just went live on the asset store today, so it should be available to download using the asset store download manager within Unity. Please be sure to back up your current project and the .unitypackage file for version 1.16 if needed before downloading. As always, feel free to let us know if you have any feedback or questions about using the asset. Thank you!
     
  8. Z00MBY_Alex

    Z00MBY_Alex

    Joined:
    Jul 10, 2013
    Posts:
    7
    Thank you! Successfully updated!
     
  9. scottmakesgames

    scottmakesgames

    Joined:
    Jul 13, 2013
    Posts:
    2
    Hi there i am not the best at coding but I really need help. I want to add futuristic guns into my game but I cant seem to figure out how to add them so that they can be like the guns that are already in the game(so they can be picked up and moved). Any help would be great. Thanks!
     
  10. Z00MBY_Alex

    Z00MBY_Alex

    Joined:
    Jul 10, 2013
    Posts:
    7
    Hey Azuline!

    Some stuff that can be very useful:

    - Flashlight that can be used as a weapon
    - Short knife, with reduced radius attack
    - Empty hands from the first person
    - View from 3 persons
    - Destructible barricade, which can be installed in any place. AI must attack and destroy the barricades
    - Hit table, to detect the damage to parts of the body
    - Armor on different parts of the body for the Player
    - Attach system for weapons

    Would be cool if you add these things in Your next update!
     
  11. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    288
    Hey Azuline!
    Just updated to 1.17, and it is freaking fantastic!! :p

    Following your updated instructions, I was able to easily use one of my own models to replace a NPC!!

    Well done and keep up the great work :cool:
     
  12. Deleted User

    Deleted User

    Guest

    Hi scottmakesgames, not to worry :) we've designed the asset so no coding is required to make new weapons and pickups. Here is a video that walks you through the process of adding new weapons:



    And here is a guide that explains how to add new weapon pickups by duplicating and customizing the existing objects:

    If you want to have the player pick up your weapon from the game world, you need to create weapon and ammo pickups. First of all, you should have the weapon and ammo pickup models you want to use imported into your Project Library. Then, in the Project Library window, expand or view the !Realistic FPS Prefab Files/Objects/!!Pickups folder and duplicate a Pickup_weaponname object and an Ammo_weaponname object. Then rename the "weaponname" part of the names to your weapon's name. Then you need to set the “Weapon Number” value of the Weapon Pickup and Ammo Pickup scripts to the number of the weapon in the “Weapon Order” array in the PlayerWeapons script (the MP5’s weapon number is 2 and the katana’s number is 1, for example). Also, the existing item objects' mesh should be swapped with your new weapon or ammo mesh and its material. And finally, you just need to update the “Ammo To Add” amount of the Ammo Pickup script.

    You can choose to have the pickups be moveable or static. For the static pickups, just drag the pickup object into the scene from the library and uncheck to deactivate the object's rigidbody component. Both pickups can be dragged from the library into the 3D scene view and moved and rotated as needed.

    The process for adding new weapons and weapon/ammo pickups is basically the same, where you just duplicate an existing object and customize its script component variables as needed. The Weapon Order array index number your new weapons have been assigned in the FPS Weapons object's PlayerWeapons.cs component can be used for the Weapon Number value of the WeaponPickup.cs component of the weapon pickup object, so the pickup script knows which weapon to give the player when they use/activate it. If you have any more questions about this, please let us know.


    Those are some great ideas Z00MBY_Alex. We're definitely looking into a lot of them. Some of these can be grouped together based on what changes would need to be made. The armor and damage amounts for different parts of the body are similar features and probably would be implemented at the same time. The knife, flashlight, and empty hands would be a good addition too. We already have a knife and grenade model ready to be animated.

    In version 1.17 you can create destructible barricades by duplicating a Glass prefab from the Interactive Objects folder, breaking the prefab instance (so the original won't accidentally be overwritten), and changing the particle and sound effects, mesh, and collider components to fit the style of a barricade object. Making the NPCs attack it would just take a few changes to the AI.js script. Thanks for your feedback!


    Thanks Eyehawk, glad you're enjoying the update! Good to hear that you were easily able to swap the NPC models too :)
     
  13. snowboardkid

    snowboardkid

    Joined:
    Jun 16, 2013
    Posts:
    17
    I just bought this- I am amazed at how easy it is was to put into my project and just start playing! This asset is absolutely incredible, thankyou so much for making it! I've been dreaming of something like this for years.

    I do have one question for anyone who might know: I can't seem to get the (new with 4.2) realtime shadows to work with this. I can only find the one directional light (in the demo scene), so i'm not sure why the shadows are turned off. I'm probably missing something obvious...
     
  14. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    288
    Hi Azuline,
    Just wondering: what would be the best way to apply pathfinding to the ai.js script? I see there is a function called MoveTowards, but it would be great to upgrade it using something like A*.
     
  15. Deleted User

    Deleted User

    Guest

    Hi snowboardkid, good to hear you're happy with the asset! For realtime shadows, you can view the Edit->Project Settings->Quality menu and check that the Disable Shadows option is not selected in the shadows section. Also, the demo scene uses lightmaps to display the environment shadows, which might be overriding realtime shadows on certain objects. If you don't want to use the lightmaps, you can go to Window->Lightmapping and click the clear button to remove the lightmaps. If you want to use the lightmaps again, you will have to click the Bake Scene button to recompile the lightmaps. Hope that helps you get the realtime shadows displaying!


    Good Question Eyehawk, upgrading the MoveTowards method is on our list. There are a few open pathfinding projects we're evaluating that you could experiment with too. There is the WaypointMaster script, Aron Granberg's A* project, the Path Project, or making another method using Unity's navmesh. We will definitely keep you guys updated on our progress on this, but if you have any questions in the meantime, we'll be available to help.
     
  16. Aron2hip

    Aron2hip

    Joined:
    Jul 4, 2013
    Posts:
    7
    I published the game in the scene and noticed the weapon was aiming incorrectly.[video=youtube_share;XK17z5tayZs]http://youtu.be/XK17z5tayZs
     
  17. Deleted User

    Deleted User

    Guest

    Hi Aron2hip, thanks for bringing this to our attention. Has this happened for you more than once and did it happen after or during a weapon switch or weapon pickup? If so, this probably has something to do with the camera animation values not returning to zero on rare occasions.

    We introduced a fix for this in version 1.17, but there might be a case remaining where the camera animation values do not return to zero after a weapon switch. With the new code in 1.17, the fix was applied only once after the camera animation stopped playing for efficiency, but it may need to be changed to be run every frame to catch any cases like the one you described. To do this, you can comment out some code in CameraKick.cs starting at line 66:

    Code (csharp):
    1.             //make sure that animated camera angles zero-out when not playing an animation
    2.             //this is necessary because sometimes the angle amounts did not return to zero
    3.             //which resulted in the gun and camera angles becoming misaligned
    4.             if(!animation.isPlaying){
    5.                 if(!animState){
    6.                     CameraPitchAmt = 0.0f;
    7.                     CameraYawAmt = 0.0f;
    8.                     CameraRollAmt = 0.0f;
    9.                     animState = true;
    10.                 }
    11.             }else{
    12.                 if(animState){
    13.                     animState = false;
    14.                 }    
    15.             }
    like this:

    Code (csharp):
    1.             //make sure that animated camera angles zero-out when not playing an animation
    2.             //this is necessary because sometimes the angle amounts did not return to zero
    3.             //which resulted in the gun and camera angles becoming misaligned
    4.             if(!animation.isPlaying){
    5.                 //if(!animState){
    6.                     CameraPitchAmt = 0.0f;
    7.                     CameraYawAmt = 0.0f;
    8.                     CameraRollAmt = 0.0f;
    9.                     //animState = true;
    10.                 //}
    11.             }//else{
    12.                 //if(animState){
    13.                     //animState = false;
    14.                 //}    
    15.             //}  
    And also please comment out the animState declaration at the top of CameraKick.cs to prevent a compiler warning:

    Code (csharp):
    1. //private bool animState = false;
    ...then test to see if the weapon becomes misaligned again. The video you posted was helpful in identifying the problem, so we hope this will fix it. Thank you for your patience.
     
    Last edited by a moderator: Jul 29, 2013
  18. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    288
    Hi Alex,
    There is currently a Flashlight asset that you can buy - it's really good too!

    If you wanted to, you could follow the instructions set by Azuline to incorporate it as a melee weapon.

    https://www.assetstore.unity3d.com/#/search/ultimate%20flashlight

     
  19. AdriaFace

    AdriaFace

    Joined:
    Jul 28, 2013
    Posts:
    9
    Hi Azuline:D

    First i want to say thanks for this incredible asset which is very simple tu use and usefull :D
    But me and my friend have a problem, when we try to run it (for try it) we got an error: All Compiler errors have to been fixed before you can enter playmode.
    The error seems to be this (at the bottom of the unity says this): A tree couldn't be loaded because the prefab is missing.

    Can you help us?

    Thanks so much!!:D

    -Updated: Now im getting this problems :S : http://i.imgur.com/g2MotlY.jpg
     

    Attached Files:

    Last edited: Jul 29, 2013
  20. Deleted User

    Deleted User

    Guest

    Good to hear you're enjoying the Realistic FPS Prefab, AdriaFace! To address your first issue with the tree prefab, in the 3D scene view, do you notice any trees at all in the demo scene, or are they present, but the console is returning that error? This could be caused by the prefab not being imported completely or the tree reference used by the terrain object might not be pointing to the tree prefab object located in Assets\!Realistic FPS Prefab Files\~Demo Scene Assets\~~FPS World Files\!!Other Packages\Terrain Assets\Trees Ambient-Occlusion/PineWithCollider1. To verify that the correct tree prefab is being used by the terrain, you can select the terrain object, click the tree icon, select the PineWithCollider1 reference (top row second from left) then click the Edit Trees->Edit Tree button, and drag the PineWithCollider1 prefab from the Project Library to the Tree field of the Edit Tree window that opened.

    The other errors shown in your screenshots appear to be related to the Unity standard asset packages that have been imported along with the Realistic FPS Prefab in your project. The fact that some of the console warnings say 'UnityEngine.GameObject.active' is obsolete could mean that the standard asset packages in your project are from an older version than Unity 4.x because GameObject.active and GameObject.SetActiveRecursively() were depreciated in Unity 4.x.

    To fix this, you can try creating a new project in the version of Unity you are running by going to the File->New Project menu, and don't select/check any of the packages listed in the window labeled "Import the following packages:". Then, once your new, blank project has opened, you can import the Realistic FPS Prefab using the Asset Store Download Manager, verify that the demo scene runs without any errors, and then right click on the Project Library and select Import Package to import any additional standard asset packages needed for your project. If you are still experiencing the errors after following the above steps, please let us know so we can work with you to find a solution.
     
  21. NessimOnair

    NessimOnair

    Joined:
    Jul 19, 2013
    Posts:
    22
    Azuline studio Hello :) I need help I want to make a zombie with waypoints for entertainment and atack for moving in directions precise :/ is posible with the kit? or if you know a script
     
  22. Deleted User

    Deleted User

    Guest

    Hi NessimOnair, it is possible to make the zombie NPCs patrol a waypoint path using the myWayPointGroup var of AI.js and the waypointGroup and waypointNumber vars of AutoWayPoint.js. The NPC wil follow this path before they see the player and pursue them. NPCs can also be spawned using the MonsterItemTrap.cs and MonsterTrigger.cs scripts. If you're asking about pathfinding for the NPCs when they pursue the player, this has yet to be implemented, but is on the list for a future update. Hope that answers your question!
     
  23. NessimOnair

    NessimOnair

    Joined:
    Jul 19, 2013
    Posts:
    22

    Azeline hello thank you for your help :) I wonder if there is a planned multplayers mode? or otherwise how to make my own GUI with the kit?
     
  24. Deleted User

    Deleted User

    Guest

    No problem! Multiplayer is a possibility in the future, but we plan on implementing an official third person mode before doing so. A few users have mentioned Photon Networking, so that might be a good place to start in the meantime.

    Adding a custom GUI should be fairly straightforward, you just need to set the GUI rendering elements to layer 14, the GUICamera layer, which is rendered by the weapon camera. This will allow the interface graphics to be drawn on top of the first person weapon models. The scripts also release the mouse and suspend player actions when the game is paused (when Time.timescale == 0), allowing for interface button presses and other behaviors. Thanks for your feedback!
     
  25. NessimOnair

    NessimOnair

    Joined:
    Jul 19, 2013
    Posts:
    22

    woaaaa yesss :$
     
  26. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    Hello Azuline

    As it stands you have made the best fps kit in the asset store, but now I hear you say that you are implementing an official third person mode, this is a great feature to add and I would like to hear more on this.

    I assume that you will replace the hands animations with full body animation even in fps mode?
    In other words your not going to have both animations on the character, hide full body when in fps mode ect?

    Are you going to use mecanim system?
    I really hope you use mecanim.

    I've seen many people looking for a third person kit that uses mecanim. there's just been a release of this but the current kit on the market fails big time in the fps side of things.

    I hate to ask this question because it sounds like I'm rushing you, but I'm not.
    When do you expect to release this 3rd person feature?
    Just rough estimation, like 1 month 3 months 6 months 1 year?

    Keep up the great work guys
     
  27. NessimOnair

    NessimOnair

    Joined:
    Jul 19, 2013
    Posts:
    22
    Azuline Hi :) I want to know how to put a character with animation in the prefab player with weapons etc.. story to a multi and see the other player prefab with janbe body etc. ..
     
  28. MolowaKeiki

    MolowaKeiki

    Joined:
    Dec 21, 2012
    Posts:
    6
    Hey Azuline it's me again. I am super excited to explore all the new features of your latest update!....but......I'm having some errors that are coming up again. I'm sure they are an easy fix, I'm just too big of a noob to see the problem. Anyway, I'm getting these NullReferenceException errors for the Ironsights script, as well as WeaponBehaviors script.

    NullReferenceException
    Ironsights.Update () (at Assets/!Realistic FPS Prefab Files/Scripts/Weapons/Ironsights.cs:316)

    NullReferenceException
    WeaponBehavior.Start () (at Assets/!Realistic FPS Prefab Files/Scripts/Weapons/WeaponBehavior.cs:213)

    I'm not quite sure what is up with it. I tried just creating a new scene and dragging in the imported prefab but still had the same problem. I was wondering if it was something that I did when I added some of my own code so that's why I tried it in a different scene.

    When I push start, I get it to start up but it shows all the guns at once. I can walk around but thats it.

    Any help on this issue would be great :) No rush though!
     
  29. Deleted User

    Deleted User

    Guest

    Thanks MoHo! To start, we are thinking the hand and weapon animations for first person would remain unchanged, with possibly the third person model’s legs being visible (which would depend on the player model and animation method). Using Mecanim would be ideal too, but we’ve had several requests to maintain compatibility with Unity version 3.5, which does not have Mecanim. So most likely a third person mode would first be implemented using the legacy animation system and then an option could be added later to use Mecanim player animation if version 4.x or higher is detected.

    A third person mode is probably a few months away because we’re focused on adding some other first person features and some testing needs to be done to ensure that third person is implemented in the best way possible for the asset. It depends on how smoothly the work goes and what needs to be changed. Currently, it looks like adding a third person mode will involve toggling the mouse input and camera movement method to orbit or turn with the player, toggling unneeded first person behaviors while in third person, and playing the character model’s animations based on the player movement/action states. Hope that answers your questions.


    Hi NessimOnair, your question is similar to MoHo’s in that it involves adding third person mode. We are still looking into this, but to quote my above message:

    “third person mode will involve toggling the mouse input and camera movement method to orbit or turn with the player, toggling unneeded first person behaviors while in third person, and playing the character model’s animations based on the player movement/action states.“

    So with some experimentation and study of our docs and scripts, it should be possible. Sorry I don’t have any specific directions on how to do this yet as we are looking into this too.


    It looks like those errors might be related to the sprinting animation, MolowaKeiki. Have you created any new weapons? If so, the animation component of the weapon child object should have the RifleSprinting animation if it’s a rifle-type weapon, or the RifleSprinting and PistolSprinting animations if it’s a pistol-type weapon, included in its Animations list.

    Null reference errors could also occur if the default setup of the prefab has been changed and references to certain objects or assets has been broken. This is particularly important for script variables like playerObj or weaponObj which are hidden from the inspector to minimize clutter.

    I would suggest that you try reimporting (and possibly re-downloading) the asset into a blank, empty project (with no standard assets imported) and testing for errors. If you still get errors with the default setup, I can send you some test scripts that bypass the version check code which involves activating and deactivating weapon objects, in case that is the problem. If the errors don’t appear after reimporting, you can have a look at the changes you made with your code (or post/send an overview of your changes if you'd like our opinion) and try to narrow down what might be causing the errors. I hope this gives you some ideas, but please let us know if you still need assistance.
     
  30. MolowaKeiki

    MolowaKeiki

    Joined:
    Dec 21, 2012
    Posts:
    6
    Thanks! I'll try redownloading and reimporting it and let ya know what I figure out! Love the customer service btw! You should charge way more for this package. Just saying. lol
     
  31. clawd31

    clawd31

    Joined:
    Aug 5, 2013
    Posts:
    26
    Hello Azuline, will you release a version with the multiplayer, if so, can I have a date (very) rough in this version?
    Good luck :p
     
  32. Dari

    Dari

    Joined:
    Mar 25, 2013
    Posts:
    130
    How can I add new bullet marks and bullet impacts, I saw you already have stone marks and I'd like to use them. =)
    Thanks! Btw, new version is awesome, this is the best asset ever!
     
  33. Deleted User

    Deleted User

    Guest

    No problem MolowaKeiki! Glad to help :grin:


    Hi clawd31, multiplayer would be some time away. Six months or so is a generous estimate, but it all depends on how smoothly other features are implemented. We like to do a lot of testing to make sure new features work properly, which can take some time. It really should just be a matter of learning the specifics of the networking tool set, whether it is Unity's built in system or using an open project like Photon Cloud. We'll definitely keep you updated as work progresses on this.


    Thank you Dari! We just wrote a new guide on adding surface types which covers setting up bullet marks, impact particle effects, impact sound effects, and footstep sound effects for a new stone surface type. The tutorial was written in sequence as we went through the steps, so it should be simple to follow, but if you have any questions about it please let us know.
     
    Last edited by a moderator: Aug 7, 2013
  34. Dari

    Dari

    Joined:
    Mar 25, 2013
    Posts:
    130
    Thanks alot! I also found the same zombie model you got, but it has 1024x1024 texture resolution and it has advertisement on it :(
    Your hasn't got advertisement and it's 512x512, heh. Thanks again for the awesome update. :D
     
  35. Goofy420

    Goofy420

    Joined:
    Apr 27, 2013
    Posts:
    248
    This is a mess. The firing, jumping controls span all over the solution making this the worst decision for anyone wanting to convert to mobile controls.
    I'll stick with the Ultimate FPS while this one gets some much needed maintenance.
     
  36. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    @Azuline Studios Thanks for the reply

    @Goofy420 you don't know what you're talking about. I suggest you learn the "basics" of unity before you even post.

    You sound like a goofy angry child. Now run along mummy is calling you
     
  37. Dari

    Dari

    Joined:
    Mar 25, 2013
    Posts:
    130
    I agree with you, MoHoe.
     
  38. Deleted User

    Deleted User

    Guest

    No problem Dari! Yes, we resized the zombie texture, but you can use the higher resolution file if you want and it should still display correctly on the mesh. You can also open the texture in an image editor and change it as needed.


    Have you read this blog post? The input calls are located where they are needed in the scripts and we think that adding another layer between the actual behavior code and the input code is unnecessary when you can right click on the button KeyCode name in FPSPlayer.cs and select the “Find references” option in MonoDevelop, which will bring up the location of all the references for that button in the solution. Then you can paste whichever input call you want to use in its place.

    If your mobile input methods can access Unity’s built-in input axes, all you have to do for virtual/touch joystick movement is check the “Use Axis Input” of the FPSPlayer.cs component and set up the axes in the Input Manager. The Mouse X and Mouse Y axes Type can also be set to Joystick Axis to move the player's view with a joystick. We will be looking into adding our own mobile input method after several other gameplay features have been completed. Please let us know if you have any more questions about using the asset.


    Always glad to help! Appreciate your support and understanding, guys :)
     
  39. NessimOnair

    NessimOnair

    Joined:
    Jul 19, 2013
    Posts:
    22

    I have a problem with the zombie can add other models zombie be that this is the bug annimation be the bug script :/
     
  40. Deleted User

    Deleted User

    Guest

    Hi NessimOnair, a while ago we posted the guide from the docs for adding a new character model for NPCs. Were you following the steps in that guide when you encountered the issue? If so, could you please try to provide some more details about what is happening with your character model, such as, do the animations play or are there any errors displayed in the console window?

    A few things to note: The AI.js script needs to have a reference to the character mesh’s Animation Component. This is handled automatically if the AI.js component is attached to the same object that has the Animation Component, or if the Animation Component is on a different object than the one with the AI.js and other components, you can drag the mesh object with the Animation Component over the Object With Anims field of the AI.js component to create the reference. Also, in Unity 4.x the Animation Type for the character model should be set to Legacy. I hope this gives you some ideas, but please let us know if you’re still encountering the issue.
     
  41. TheNorthridge

    TheNorthridge

    Joined:
    Jan 4, 2012
    Posts:
    193
    Hey Azuline,

    Cant wait to see Third Person mode implemented, Your slowly making this pack more and more what Id hoped it would be :)

    BTW, Do you think you guys will ever add OUYA support through a different FPS Prefab?

    And any future thoughts on Mission/Objective Systems? Maybe as a Seperate Plugin?

    Best of Luck!
    TheNorthridge
     
  42. zwickarr

    zwickarr

    Joined:
    Nov 20, 2012
    Posts:
    28
    Hello,

    When I change the "player height mod" (1.25 for example) in the Body Walker script, I am no longer able to move. I am trying this in the test scenes that come with this add-on. Anyone else have this problem?
     
  43. unity3dx

    unity3dx

    Joined:
    Apr 15, 2011
    Posts:
    175
    I have some problems with your script... here is the list, let me know if it is me, or how to fix them.

    1- when you are walking, the player bobbing too much up and down... just try to walk in your room and you will see that your vision is stable. I had to change all the values in the Bob settings to get something that does not make you sick like in a boat after a while. If you call this asset, realistic, then just walk and see by yourself, the brain is a good stabilizer. Or play at any HL2 mods and compare.
    2- when I shoot with the AK-47 for example to the wall, there is no decal on the wall. It is me or is it normal? I would expect from a realistic prefab to have some decals on the walk it is a very basic feature.
    3- in many place the player get stuck and cannot move. Apparently there is no 'push back' option. There must be. If the player walk on some garbage, the collision should push him back, so that he cannot stay stuck in a wall, or between a wall and a tank for example. I not see anything like this. Again play any HL mod and you will see that if you push against a wall, the player is pushed back... realistic or not, it is necessary to avoid being stuck...
    4- I have stairs... you player cannot climb them. I try to go and in the middle, it stops and slowly glide down. While it does it I cannot jump. So basically, it is impossible to climb basic stairs.

    Fixes:
    Ok, so I get one fix... the main issue for the stairs is that the test for being grounded or not is done only up. For handing the stairs, it needs to be up and forward.
    I have created a variable similar to capsuleCastHeight for the width of the capsule and here:
    // part when you decide if the player is grounded or not
    if (Physics.CapsuleCast (p1, p2, capsule.radius * 0.9f, -myTransform.up, out capHit, capsuleCastHeight, clipMask.value)
    I also do a CapsuleCast with in front of the player to see if he collide with the stairs in front of him..
    working so far.
     
    Last edited: Aug 14, 2013
  44. Deleted User

    Deleted User

    Guest

    Thank you TheNorthridge, we'd definitely be interested in supporting the OUYA. We're still working on the base asset at the moment, but we'd like to do some research on this in the future. A mission and objective system is a good idea too. It's unknown at this point how or when that would be released, but it is all very possible. Thanks for the encouragement :)


    Hi zwickarr, we can confirm that Player Height Mod values larger than 1.0 and less than 2.0 produce this issue. We think we might've found a fix for this which you can try by changing line 207 of FPSRigidBodyWalker.cs from this:

    Code (csharp):
    1. if(playerHeightMod > 1.0f){
    to this:

    Code (csharp):
    1. if(playerHeightMod > 2.0f){
    ...and that should allow the player to move normally with playerHeightMod values between 1 and 2. Thank you for bringing this to our attention.


    Hi unity3dx, I'm glad that you were able to customize the bobbing amounts to your liking, the default values are just a matter of personal preference as we like the camera to move more when the player walks. In a full game, you could add an option to turn off or minimize player bobbing too.

    The weapons should be leaving marks on the walls based on the tag the game object has been assigned (Metal, Wood, Dirt, Glass, Water). Do the weapons also make impact effects on the walls, without leaving marks, or are there no effects at all? If there are impact effects, but no bullet marks, you might want to check that the collider that is being hit has one of the previously mentioned, case sensitive, surface tags assigned to it (Metal, Wood, Dirt, Glass, Water). The wall objects should also be set to layer 10, the world collision layer.

    We appreciate the feedback on player movement. We've done a lot of testing to ensure the player can climb stairs and inclined planes with angles less than the FPSRigidBodyWalker.cs component's Slope Limit amount, but we will do additional tests for the situations that you described. Some of the issues might be related to changing certain settings to fit the size of the map, instead of scaling the map down to the size of the player. This would be better for use with the prefab, which has been set to the range that is recommended for realistic physics interactions. Good to hear you've had success with modifying the capsule cast to use the forward direction as well. Hope the above information might help you solve some of the issues.
     
    Last edited by a moderator: Aug 14, 2013
  45. zwickarr

    zwickarr

    Joined:
    Nov 20, 2012
    Posts:
    28
    Hi Azuline, thanks that works!
     
  46. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Hello,
    In the script "FPS Player" of the 1.16 I change the "exit game" button by V

    I'd also add to the script when the exitgame key (V) is pressed then we sent her on the stage of my menu

    But I just spent in 1.17 and there new line of code and I do not see how to put this ...

    Can you help me please?
     
  47. Deleted User

    Deleted User

    Guest

    Hi Defcon44, the new line of code in version 1.17 you mention is probably is related to detecting if the project is being run in the editor, web player, or stand alone. This was added to prevent a crash while exiting using Application.Quit() in previous versions of Unity 4.x. This issue appears to be resolved in Unity 4.2 so you can safely change this 1.17 code for the quit button in FPSPlayer.cs at line 261:

    Code (csharp):
    1.         //Exit application if escape is pressed
    2.         if (Input.GetKey (exitGame)){
    3.             if(Application.isEditor || Application.isWebPlayer){
    4.                 //Application.Quit();//not used
    5.             }else{
    6.                 //use this quit method because Application.Quit(); can cause crashes on exit in Unity 4
    7.                 //if this issue is resolved in a newer Unity version, use Application.Quit here instead
    8.                 System.Diagnostics.Process.GetCurrentProcess().Kill();
    9.             }
    10.         }
    to this:

    Code (csharp):
    1.         //Exit application if escape is pressed
    2.         if (Input.GetKey (exitGame)){
    3.             Application.Quit();
    4.         }
    As far as exiting the current scene and loading the menu scene, you probably don't want to use Application.Quit, but Application.LoadLevel instead using something like: Application.LoadLevel ("MenuScreen"); You can also duplicate and rename or modify the LevelLoadFade.cs script and have it load the menu scene by calling this function:

    Code (csharp):
    1. FadeAndLoadLevel( Color color, float fadeLength, bool fadeIn )
    so the current screen will fade out before loading the menu scene. Hope that helps.
     
  48. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Great !

    That work !

    Thanks you ^^
     
  49. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Hello !

    Me again ^^

    So I want add weapon on my games.

    I have look your video on your blog

    Animation = OK

    But i don't no how add weapon prefab, please help me :)
     
  50. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    680
    Any idea when lean left/right might be ready? Dev build is also okay, if you got something almost ready. I actually did my own leaning system, but having small issue with colliding walls. It kind of works, but sometimes camera goes through the wall. So just wondering should i wait, or keep trying.. great pack btw, if i have forget to mention :)