Search Unity

Realistic FPS Prefab [RELEASED]

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

  1. nertworks

    nertworks

    Joined:
    Mar 6, 2014
    Posts:
    21
    Thanks for the update Azuline. Looks like I would need to put that code somewhere in the WeaponBehavior.cs script. I made a fuction called firewater. And it only calls to it if I have hit a water collider with the raycast hit. I named it S*** instead of hit so it wouldn't get confusing. Didn't realize how funny it would look.

    void FireWater( RaycastHit hit, Vector3 direction )
    {
    RaycastHit[] S***s;
    S***s = Physics.RaycastAll(transform.position, transform.forward, 100.0F);
    int i = 0;
    while (i < S***s.Length) {
    RaycastHit S*** = S***s;
    Renderer renderer = S***.collider.renderer;
    var S***Name = S***.collider.name;
    if (renderer) {
    //renderer.material.shader = Shader.Find("Transparent/Diffuse");
    //renderer.material.color.a = 0.3F;
    Debug.LogError("Something was S*** | "+S***Name);

    }
    i++;
    }
    }

    This doesn't seem to quite do it. What am I missing? Thank i advance for your help.
     
  2. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Thanks for your reply OP! I can see how that would be right, actually. The buildings that were being "moved" were causing a few errors tbh, not just that one. Unable to crunch them, nor could I use meshbaker on them. Great assets but kinda pissed I dropped $75 on the pack now that I'm not going to be using them! Lol.


    And as for the weapon change, that makes sense. I did the same thing with UFPS, not sure why it didn't occur to do that here. Thanks!
     
  3. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Ok so the buildings "reposition" after placing them, then moving the character. Disabling the recenter script worked. Thanks.

    I've got a couple shipping containers that I want to be able to climb, so I've attached both climbing scripts. Unfortunately the "activate" script doesn't seem to work? Once I climb up, it deactivates the box collider, but doesn't reactivate when I leave it.
     
  4. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    No replies yet...

    Anyway, new problem... Adding new weapon in, duped the Katana and added in a baseball bat. The animations don't work and the band sits outside of the hands despite being aligned to the hands in scene view. :/
     
  5. nertworks

    nertworks

    Joined:
    Mar 6, 2014
    Posts:
    21


    NEVERMIND i figured it out.
     
  6. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37
    Make sure your new weapon is on the GUN layer. It's being rendered by the main camera instead of the gun camera. For the second problem.
     
  7. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    It's sitting under the Weapons object and it's layer is GUN. So no idea why it does this.
     
  8. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37
    hmmm, I successfully got a hatchet in game, but I changed the katana, I didn't copy it.
     
  9. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    I might try that. Only problem is I need multiple melee weapons so we'll see how it goes. Cheers for the idea.
     
  10. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Hey I have an issue with the ai. I've replaced the zombie ai with a pig. Everything is working fine except the waypoints. It's animations, seeing me, attacking, death, etc are all working fine but if I put way points down it just spins in circles really fast.

    Here are my waypoints: http://i.imgur.com/Q1XTYS0.png
    Here is a gif of the spinny pig: http://gfycat.com/ScratchyImperfectFinnishspitz

    Also, is there an option to have the AI run away from the player?
     
  11. Mellnik

    Mellnik

    Joined:
    Mar 15, 2014
    Posts:
    2
    I set limitedSprint to false but the player still stops running after some time. This also applies to usePlayerHunger, I set it to false but it still works.
    Any idea?
     
    Last edited: Mar 15, 2014
  12. Deleted User

    Deleted User

    Guest



    Hi nertworks, so you figured out the underwater bullet raycast? We decided to try doing this without using RaycastAll, and just ended up performing another ray cast at the first's hit.point if the surface tag was "Water". The second raycast's layer mask (liquidMask) uses the same layers as the bulletMask, but excludes layer 18, the liquid Collision layer, so the raycast can travel through the water trigger. This change will be part of the next update, but if you want to implement it now, you can add this layer mask below the bulletMask declaration around line 93 of WeaponBehavior.cs:

    Code (csharp):
    1.     public LayerMask bulletMask = 0;//only layers to include in bullet hit detection (for efficiency)
    2.     /*Add this code:*/private LayerMask liquidMask = 0;//only layers to include in underwater bullet hit detection (for efficiency)
    Then in the Start() function, around line 221, you can add this code to set up the liquidMask layer mask:

    Code (csharp):
    1.                 }else{
    2.                     muzzleFlashReduction = 2.0f;        
    3.                 }
    4.             }
    5.            
    6.            /*Add this code:*///exclude layer 18, the liquidCollision layer, from bulletMask so second raycast
    7.             //of shots fired from above water don't collide with water trigger
    8.             liquidMask = bulletMask  ~(1 << 18);
    And for the last step, add this around line 862 in the FireOneShot() function:

    Code (csharp):
    1.                     //check for ranged weapon hit
    2.                     if(Physics.Raycast(mainCamTransform.position, direction, out hit, range, bulletMask)){
    3.                         HitObject(hit, direction);
    4.                        
    5.                         /*Add this code:*///Perform a second ray cast from impact point if bullet collided with water, so bullets will hit underwater targets.
    6.                         if(hit.transform.tag == "Water"  Physics.Raycast(hit.point, direction, out hit, range, liquidMask)){
    7.                             HitObject(hit, direction);    
    8.                         }
    ...and the weapons should hit underwater targets now.


    No problem ShinfoK, we've been keeping our eye out for the misaligned meshes during runtime, but haven't seen any in the newest verison of Unity, so hopefully it's a mesh or LOD setup issue.

    For the ladders on the shipping crates, when you mention the activate script not working, are you trying to make the ladders toggle-able? Or are you referring to the weapons activating and deactivating when climbing? The ladder trigger itself should be active since the start of the scene, but if the weapons are not activating properly after exiting the ladder, one of the prefabs might be misconfigured, and you might want to try importing the Realistic FPS Prefab into a new, empty project. If the problem still persists, we'd suggest redownloading the asset from the Asset Store.

    Here is a video that might help you with the process of adding new weapons. The easiest way is to duplicate an existing weapon parent object (MP5, Katana, M1911), located under the FPS Weapons object, then changing the name and making an entry for it in the WeaponOrder array of the PlayerWeapons.cs script. rgrlee71 is right that any new weapon meshes that are added to the prefab need to be on layer 8, the Gun layer, so the scripts can identify them for positioning and animation. We're also looking into making a better guide/video on this process, as has been requested by a few users.

    About the spinning pig, do you have the waypoints' AutoWayPoint.cs component vars Waypoint Group and Waypoint Number vars set up for your waypoints? The Waypoint Number vars should be set up so that each waypoint has its own number in the order they should be followed. The Waypoint Group var should be set to the same number as the other waypoints in its group, and not be shared with another group of waypoints. There isn't an option to have the AI run from the player, but with some modification of the AI.cs script, it could be done. We will look into adding an option for this behavior when we make some AI improvements in a future version. If you still have problems with weapons and the NPC waypoints, please let us know.


    Hi Mellnik, we've attempted to recreate this issue, but the limitedSprint and usePlayerHunger vars are working in our project. Are there any errors being displayed in the console? If so, you might want to try to resolving them if they are related to other assets, or downloading the Realistic FPS Prefab again and importing it into a new, blank project to see if the issues persist. If they do, could you please send us a screen shot of the FPSRigidBodyWalker.cs and FPSPlayer.cs components as they look in the inspector window so we can determine if there is a configuration issue? Thanks for your patience.
     
    Last edited by a moderator: Mar 16, 2014
  13. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Thanks for the reply Azuline. For my first issue with the climbing trigger, I was using the "Edge Climb Trigger" and "Edge Climb Trigger Activate" scripts only. Is the Ladder script also required?

    The spinning issue also happened on the zombie prefab included but moving the waypoints seemed to fix it. Doesn't work the same on the pig unfortunately. Each way point is numbered (3 way points, numbered under "Waypoint Number" 1 through 3. Each is set to group 1 (and my other pig AI are set to group 2, 3 etc).
     
  14. Mellnik

    Mellnik

    Joined:
    Mar 15, 2014
    Posts:
    2
    @Azuline Studio

    Thanks for the reply. I created an entire new project with the FPS Prefab. I set the vars usePlayerHunger and usePlayerThirst to false as you can see in the video but it still works. https://www.youtube.com/watch?v=WIprKcrIaO0

    After commenting it out, the hunger/thirst finally disappeared.
     
  15. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    First let me start by saying thanks Azuline! I created a mobile game in week with your plugin and it runs great! I'm also converting another game I made with a different FPS system. Needless to say the controls sucked and the FPS was terrible. So I am switching it to Realistic FPS. The frame rate alone has doubled and tripled in some areas!

    I have a question about the AI and their melee attack. What I am trying to do is add a non humanoid figure. The problem I am having because this is a shark (yes shark :D) is not the same shape as a humanoid zombie. So when attacking it seems you have to be below a certain area for it to hit the player. I have tried making the Character Controller radius and height match its size but then the hit does not register and it just pushed the player. IS there a way to fine tune this?

    Here is a screenshot minus the mobile controls :)
    $sharknado.jpg

    Cheers again for an awesome add on!
     
  16. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
  17. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    If the player gets close to the enemy, can the player use the currently equipped pistol or rifle as a melee weapon?

    Also, can fists be used as a melee weapon?

    Thanks!
     
  18. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    For the fists weapon, I'd assume you'd modify the unarmed (or create a new weapon) and use the fists and add an animation and damage script. Don't see why that wouldn't work.
     
  19. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    Has anyone tried successfully creating a flame thrower? I was thinking of attaching the particle effect to the muzzle flash. Maybe add it to the shotgun and up it's rate of fire. Mmm crispy zombies!
     
  20. nertworks

    nertworks

    Joined:
    Mar 6, 2014
    Posts:
    21
    This seems to work in multiplayer but as soon as I add another player it makes it so neither can walk around anymore. What should I do?
     
  21. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Why can't I modify the actual damage taken when falling? I can modify the threshold, but that doesn't seem to change much other than the height required to fall to get hurt... At the moment, I'm falling from a rather tall structure that I'd like for my player to die from, but it's only knocking about 80% off.
     
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    A Dialogue System customer had a question about integrating with Realistic FPS Prefab. This short video tutorial demonstrates how to do it.
    [video=youtube_share;-WkokL4iBL8]http://youtu.be/-WkokL4iBL8
     
  23. Andy Charlie

    Andy Charlie

    Joined:
    May 31, 2013
    Posts:
    31
    Is possible to configure a rotation value in the zooming state?
    Something like "weaponZoomZRotation"
     
  24. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Was this ever implemented?
     
  25. Deleted User

    Deleted User

    Guest

    No problem ShinfoK, if you're going to make a ladder, we suggest using the Ladder prefab object located in the Assets\!Realistic FPS Prefab Files\!Objects\!InteractiveObjects folder as a starting point. The Ladder.cs script will provide much more reliable and standard ladder behavior, as the EdgeClimbTrigger.cs and EdgeClimbTriggerActivate.cs scripts are more prototype parkour/wall climbing scripts.

    So the spinning zombie was fixed by moving the waypoints, is the pig NPC or the pig's waypoints stuck in the ground by any chance? One test you can do is to drag a default NPC from the project library like the robot and set it to patrol the same path as the spinning pig NPC. If, after doing that, the robot spins also, then it must be a problem with the waypoint path or a script. If the robot NPC follows the path normally, then it must be something to do with the configuration of the pig NPC. We will have to do some testing to see if we can recreate the issue you describe.


    Thanks for the video Mellnik, that really helps us understand the issue. The changes you made to the FPSPlayer.cs script when you set the vars to false in the initialization code are overridden by the check box value of those vars in the FPSPlayer.cs component in the inspector window. So you might want to try selecting the FPS Player object in the hierarchy window of the Unity editor and unchecking the Use Player Hunger and Use Player Thirst boxes. Hope that helps.


    Congrats on your game, yummybrainz! That is a good question. Since the default NPCs have character controller components, they use vertical capsule colliders for their collision, which would cause unrealistic hit detection on an NPC like a shark, which should be using a horizontal capsule collider. So to use a horizontal collider for hit detection on NPCs like a shark, you can follow these steps:

    1. Go to GameObject->Create Other->Capsule
    2. Drag capsule over the shark NPC so it becomes a child of the main NPC object.
    3. Uncheck the box on the CharacterDamage.cs component of the main NPC object to deactivate damage on the vertical NPC collider.
    4. Select the capsule, rotate it horizontally as needed, and set it to layer 13, the NPCs layer, and set the game object tag to "Flesh".
    5. Drag the CharacterDamage.cs script from the project library over the capsule.
    6. Then use the same Dead Replacement and Die Sound assets as the CharacterDamage.cs component of the main NPC object (that you deactivated) for the CharacterDamage.cs component you just attached to the capsule. The Dead Replacement object might need to be tweaked to have the same rotation as the capsule, since the capsule is rotated in relation to the main NPC object.
    7. Then make these changes to the CharacterDamage.cs script:

    Add a bool called notParent around line 11:

    Code (csharp):
    1.     public AudioClip dieSound;
    2.     //true if collider hit is a child object component of NPC parent, so remove parent object on Die() instead of this object
    3.     public bool notParent;
    Then around line 96 change this code:

    Code (csharp):
    1.             Destroy(transform.gameObject);
    to this:

    Code (csharp):
    1.            
    2.             //Determine if this object or parent should be removed.
    3.             //This is to allow for different hit detection collider types as children of NPC parent.
    4.             if(notParent){
    5.                 Destroy(transform.parent.gameObject);
    6.             }else{
    7.                 Destroy(transform.gameObject);
    8.             }
    8. Then go back to the capsule CharacterDamage.cs component and check the Not Parent box.

    After these steps, the NPC should take damage using only the second capsule collider, which can be rotated as needed to fit the shape of the NPC character model. There would need to be some changes to AI.cs to make actual swimming NPCs, but this will at least allow the shark to "levitate" on the ground. Also, you can try increasing the size of the character controller capsule to prevent the NPC model from clipping into world geometry. These steps worked for us, but if you run into any problems, please let us know. Keep up the great work!


    A damage direction indicator is something that we'd like to implement eventually. First of all, the ApplyDamage(damage) function of FPSPlayer.cs needs to be updated to have a second argument like ApplyDamage(damage, attacker) so the script can compare the attacker position to the player position to calculate the direction of the attacker. This information could then be drawn on the HUD using GUITextures. These are just some ideas, but hopefully they can be a good starting point.


    Hi eridani, secondary melee attacks/pistol whips with ranged weapons are on our list for a future update. ShinfoK is right that you can also create a new melee weapon and use a punching animation for fists.


    Haven't seen flamethrowers in any projects yet, but they should be possible :) WeaponBehavior.cs could be modified for flame thrower hit detection by using an invisible capsule collider that detects collisions with objects when the flame is shooting.


    Hi nertworks, we haven't done much multiplayer testing yet, but you might want to try deactivating the WorldRecenter.cs script attached to the FPS Player object. Are there any errors displayed when the second player is added? Another thing to look into is how the networking system instantiates and tracks the player objects. The only static code we use in the project is for the NPC waypoints, so it shouldn't be a problem. We also are doing some testing to change the Start() loops in our scripts to OnEnable() loops, which should make the player prefab more flexible for activation/deactivation and instantiation. Thanks for your patience.


    You're right about the falling threshold ShinfoK. We don't have an exposed var for a falling damage multiplier, but we can add one in the next update. If you want to change the falling damage amount in the current version, it is calculated at the bottom of the FPSRigidBodyWalker.cs script in the CalculateFallingDamage(fallDistance) function. You can then change fallDistance * 2 to something like fallDistance * 3 as needed.


    Great video TonyLi! Really neat to see the NPCs conversing with the player. We'll definitely be following your progress on this.


    Hi Andy Charlie, do you mean like having the weapon or camera roll when zooming? The weapon position and camera FOV are modified when zooming in the Update() loop of IronSights.cs, so the code could be added there. The other change that might be needed is to deactivate or modify the default code in GunSway.cs or CameraKick.cs which would be trying to update weapon or camera roll at the same time while zooming. Please let us know if you'd like more help on this.


    It hasn't been implemented yet ShinfoK, but it is on our list. The plan is to do grenades and bow and arrows at the same time since they both work in similar ways, with the fire button being held and playing the fire animation to a drawn position, tracking the time the button is held to apply to the velocity of the projectile and optional cook timer, then playing the rest of the fire animation and instantiating (or moving from an object pool) a projectile object with a velocity when the fire key is released. Most of the individual behavior of the projectiles can be handled by a script attached to the projectile object itself, as the WeaponBehavior.cs script would treat both bow and arrows and grenades in more or less the same way. Thanks for your feedback.
     
  26. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Thank's again for the replies and being patient with all my questions, I appreciate it and will go through you replies to see what result I have soon!

    The projectiles update would be greatly appreciated if you have the time! I foresee perhaps the ability for weapon's with attachments like grenade/flare launchers, rock throwing (think far cry 3, used to distract enemies) would be a popular addition.

    Another question, since I'm posting. Is there an easy way to have food use gain health as well? Attaching the health pickup doesn't work of course. I suppose it would be a matter of copying the same code from inside the health and adding to the food?

    Thanks again! I've tried several FPS prefabs and this is the only one I'm glad I spent my money on!
     
  27. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    I've figured out my problem with the waypoints. I've had them set as children of the AI, and when the AI moves, the waypoint moves. Moving them under their own game object should do the trick.

    I'm having another issue. The Run animation doesn't play when the AI are in attack mode. Is this normal? Looks a little funny with the wolves just slowly hobbling towards me. Is there a way to have them play sound whilst running at you/patrolling?
     
    Last edited: Mar 22, 2014
  28. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Please add a grenade launcher as well as hand-thrown grenades. Also maybe a missile launcher, as I think the mechanics would be more or less similar. Thank you!
     
  29. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Ooh, attachments and upgradeable weapons! Maybe like an M203 launcher, or maybe a suppressor. Sounds like a cool idea
     
  30. Onyxius

    Onyxius

    Joined:
    Aug 26, 2013
    Posts:
    8
    Hi guys, so far this is an awesome set of prefabs and easy to use. One issue I'm having right now is when putting a ladder down or shelf and hit play it moves it to the sky to another position, any ideas why? I used google and everything i find says its the animation causing the problem, well the ladder and shelf doesn't have an animation.

    Also, I created my own terrain, and when i hit play my scene moves to the sky basically where the ladder is but my game spawns my player where I placed the player prefab.
    What am I missing?

    Thanks Guys
     
    Last edited: Mar 28, 2014
  31. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Thought I'd reply as Azuline doesn't post here that often, unfortunately. Both problems are the same issue. Go to your hierarchy, select the !!!FPS Player Main, open that up and open !!!FPS Player. Scroll to the bottom of the Inspector and disable "World Recenter" script.
     
  32. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Azuline, I've noticed my models are shaking strangely. Watch any time I'm aiming down sight in this video.

    https://www.youtube.com/watch?v=eD9t4uBSul8

    You'll see it briefly at about 5:03 but longer at other times.
     
  33. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    Hi Azuline,
    what about the lean from behind corners (typically q/e keys)... still on your list :)

    Nice work
     
  34. Onyxius

    Onyxius

    Joined:
    Aug 26, 2013
    Posts:
    8
    Awesome, thank you so much, that fixed my issue.
     
  35. TheDevGuy

    TheDevGuy

    Joined:
    Mar 3, 2014
    Posts:
    78
    Just to the new buyers, i have a custom FPS Inventory/Player system for this kit if anyone is interested in picking it up for very little.

    pm for more info
     
    RealSoftGames likes this.
  36. Deleted User

    Deleted User

    Guest

    No problem ShinfoK, to answer your question about making food pickups also restore player health, you can open the FoodPickup.cs script and add the code:

    Code (csharp):
    1. FPSPlayerComponent.HealPlayer(hungerToRemove);
    to the PickUpItem() function above where the pick up sound effect is played. This will add the hunger restoration amount to the player's health attribute when they use the food item.

    For the NPC playing the walking animation when they're attacking, you might want to check that their speed value (or runSpeed value if using the soldier package) is greater than 3, which is the default minimumRunSpeed value in AI.cs. For the zombie NPC, their default speed is lower than 3, so they never play their running animation, even if attacking, but if the NPC prefab object has a speed value higher than 3, their running animation will play when pursuing the player. The AI.cs script has been changed in the next version to not use the minimumRunSpeed var, and instead will play the running animation when the NPC is moving faster than their walkSpeed amount.


    Sure eridani, those ideas involve modifying the WeaponBehavior.cs script. Most of what you mentioned is on our list, though weapon attachments would probably be a later addition. What is needed is to make an attachment model object a child of a weapon model object, like the main gun body, and then activate or deactivate the attachment object and update the weapon parameters like accuracy, damage, and sound effects in the WeaponBehavior.cs script.


    Thanks Onyxius, the first thing you might want to check is that you are using the most recent version of Unity. We noticed this issue in older versions, but in 4.3 the world objects stayed in their original positions relative to the main camera. This issue is related the objects being repositioned by the WorldRecenter.cs script, as ShinfoK mentioned, which moves all objects in the scene closer to the origin (0,0,0) if the player starts or moves further than the threshold amount from it. This is done to prevent spatial jitter of the weapon models due to floating point precision loss.

    If you decide not to use the WorldRecenter.cs script, we suggest that you try to keep the player in a region that is between 1000 and -1000 units from the center of the scene. Here is a discussion about this which might be helpful. With the WorldRecenter.cs script, much larger scenes are possible, with the trade-off being that the coordinates of objects will change if the WorldRecenter.cs script has moved the scene objects back towards the origin.

    ShinfoK, the jittering weapon model issue you're describing is related the the WorldRecenter.cs script being deactivated. You can either limit the player's movement range to 1000 and -1000 units from the origin, or you can experiment with getting your scene objects to work with the WorldRecenter.cs script. You might want to try making the player spawn at the coordinates 0,0,0, and aligning the world objects and terrain's Y coordinate position close to 0, so the WorldRecenter.cs script will only have to translate objects horizontally and not vertically. If after trying these suggestions, you still have offset objects when running a scene, please let us know, so we can help you determine what about those objects is preventing the WorldRecenter.cs script from working properly. Edit: We also made an improvement to WorldRecenter.cs in the new version which has a less noticeable effect on the camera position. If you want instructions on how to make this change in the meantime, please let us know.

    About the frequency of our posts on the forums, the reason we don't post more often is that we've been getting a lot of support requests via email and other means lately, and need to balance our support efforts with our development efforts. It makes sense for us from an efficiency standpoint to do a forum post every week or so. Thanks for your patience :)


    Thanks ProjectOne, player leaning is still on the list. We already have the basic code in the CameraKick.cs script, we just need to add collision detection so the camera won't clip into walls and make a few more design decisions about this feature.
     
    Last edited by a moderator: Mar 30, 2014
  37. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Hello!

    I have to look at your TUTO to add a weapon, I arrive very well has to duplicate the animation and when I spawn with the weapon its walking(step) very well. I want just to know how to change the 3D object of the weapon (for me it is AK47 and I would want to put M4) but how make because I always have bugs when I replace her(it) directly.

    How can it be done?

    Thank you
     
  38. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37
    I want to thank Azuline for such a great product. I've always wanted to make a first person shooter, but it was so daunting before this asset. I've been making good progress and everything is coming together nicely. I'm a one man team, but the project is turning out better than I ever expected. I used a lot of your included scripts but some, like the AI, I had to go my own route. Almost all the game mechanics are done in Playmaker (except for the player character of course).

    My only real suggestion is for higher polycounts to the sights on your weapons. When close up they are pretty bad :) I used ProBuilder to create a new sniper scope mount to get the poly count up on the sniper view. It looks much better. The rest of the weapon is fine, just the sights are too low poly.

    If anyone wants to follow what I'm doing you can go to... http://unodev.blogspot.com/

    The video on the blog that shows me shooting at a stag was before I updated the scope mount.

    Thanks again, this is the best asset I have ever bought.
     
  39. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    169
    i need your help Azuline Studios! in version 1.19 i build my scene. when i jump, i cant move after character land and weapon model goes down (player falling i think)
    Please help :<
    Thanks!
     
  40. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    169
    i mean i cant land :<
     
  41. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    169
    oh and i cant pick up ammo and no footstep sounds! its work fine in other project but its bugged i reimported and everything same. Help!
     
  42. TheDevGuy

    TheDevGuy

    Joined:
    Mar 3, 2014
    Posts:
    78
    Dont post a bunch of times. If you need to post more issues edit your previous post with the new issues as well.

    Thanks
     
  43. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    169
    Sorry but when i press edit, edit window dont response
     
  44. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    Don't expect much of any help in regards to this though. For something that costs as much as the asset it suppliments, I would have expected a little more than a couple really poorly made youtube videos and bare minimum skype chat. I was interested in your potential crafting system, but you have straight up ignored me privately and publicly, I think I'd rather spend a bit more and just contract someone to create it for me. So, for anyone looking to buy his inventory system, yes it works, but for the amount of pissing around with it, you might as well just learn how to code and do it yourself.

    Thanks for the replies Azuline, and I apologise for sounding aggressive in my post to you, certainly not my intention, just pointing out why I was offering help to the other user! I'd much prefer you to spend time working on implementing new features on top of an already incredible asset (and a damn bargain at $30, if you ask me), than answering questions so I'm more than happy to wait, as you already provide an incredible working asset with great documentation.

    Thanks again for your help.
     
  45. TheDevGuy

    TheDevGuy

    Joined:
    Mar 3, 2014
    Posts:
    78
    It does however show poor taste in your professionalism to make statements such as this. As stated on purchase, you can contact me here on the forum more so than via skype. Not once have you tried to contact me on the forums after our skype conversation which was left with you being satisfied. Also i havent received one email from you.

    In regards to the price of $25, this system is compatible with OnGUI NGUI for ease of use and basically completes this package as a whole adding a full inventory system, new player hp,water,hunger visuals actionbar/quickslots for the player in-game.

    Alot of work went into this and i dont feel i should undersell myself just because i cannot log into skype everyday.

    I apologize to Azuline Studios for this conversation between ShinfoK and I as he should have contacted me via a PM firstly. Thank you for the great asset and i look forward to the updates.

    **To ShinfoK, i will not reply in this forum to your comments after this post. If you would like to talk privately, you can contact me via PM.**
     
  46. Deleted User

    Deleted User

    Guest

    Hi Defcon44, to replace an existing weapon model like the AK47, you can select the AK47 mesh object in the 3D scene view by clicking on it so the AK47 model's wire frame is visible. Then you can drag the new weapon model object over the selected AK47 mesh object in the Hierarchy window to make the new weapon mesh a child of the existing one, which will cause the new model to inherit the animated position and angles of the original. The new weapon model can then be positioned in the player's hands and should be set to layer 8, the gun layer. And finally, you can deactivate the AK47 mesh object to hide it.


    Good to hear you're enjoying the asset, rgrlee71 and congrats on making your own AI solution! We have plans to update our AI scripts with pathfinding and friendly NPC behavior in a future update. Thanks for the suggestion about making the weapon model sights higher poly too. The current models are meant to be a compromise for performance between desktop and mobile platforms, but they can be replaced easily. Really neat videos on your blog too, the hypothermia system is particularly interesting, and would make for some fun gameplay :)


    Hi Takahama. When you mentioned that you can't pick up ammo, no footstep sounds are playing, and can't land from a jump, are there any error messages being displayed in the console? This issue sounds like a collision detection and raycast issue, which might happen if the project you imported the Realistic FPS Prefab into didn't have the default physics manager settings imported or layers and tags set up as they are in the demo project.

    Do you remember the process that you followed to import the prefab into your new project? It is suggested that you start by importing the Realistic FPS Prefab package into a blank, empty project, which will include the needed project settings as well as the assets. Then you can import your other assets into this project. It is possible to add the Realistic FPS Prefab to an existing project, but you'll have to check that the needed files in the ProjectSettings folder were also imported successfully.

    Another thing that you might want to check is that your world geometry is set to layer 10, the World Collision layer, and your item pickups are set to layer 9, the Ragdolls/Pickups layer, so that the scripts will detect collisions and raycast hits with these objects. Hopefully this might give you some ideas, but please let us know if you have any more questions.


    No problem ShinfoK, just wanted to explain in case there was any confusion. Thanks for your feedback!


    Thanks TheDevGuy, hope you guys worked it out via PM if there was a misunderstanding.
     
  47. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Hi Azuline !

    Thanck for your replies.

    But i followed your instruction but that doesn't work for me.
    I have always bug :/ i don't have my 3D model on my camera i have just hands :(

    Can you help me ?
     
  48. HollowRockAdam

    HollowRockAdam

    Joined:
    Jan 15, 2013
    Posts:
    16
    I just wanted to say what an amazing asset this is. We have just released our new sci-fi FPS for Android (currently awaiting review for iOS and Windows Phone), called Dead Moon Saga : Episode 1. We used your prefab as a base for our engine - then added our own multitouch joysticks and it is workign perfectly.

    Using this prefab saved us months of development time and we were able to ship our quality product amazingly quickly thanks to this asset. 5 stars indeed. You can get the game here: https://play.google.com/store/apps/details?id=com.hollowrockentertainment.deadmoonsagae1

    Here are some images of the game:











     
  49. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    hi. i need some help setting up Brackeys inventory system to work with the realistic fps kit, or any inventory system. i dont have the time to make my own so i need some help f anyone can. thanks!
     
    Last edited: Apr 8, 2014
  50. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37
    The AI was actually made in Playmaker. Here is a video of me putting the stag AI through it's paces. He's darting through the landscape and dodging trees like a champ. :) You can also see the updated scope ring.