Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Realistic FPS Prefab [RELEASED]

Discussion in 'Assets and Asset Store' started by Azuline-Studios, Apr 5, 2013.

  1. inglipX

    inglipX

    Joined:
    Aug 9, 2012
    Posts:
    30
    Hey Azuline! When is the update out?
     
  2. AusAndrew19

    AusAndrew19

    Joined:
    Jun 6, 2012
    Posts:
    16
    Hey Azuline, Just curious, How hard would it be to add a texture overlay for sniper Zooming instead of the actual sight being the reticles.
     
  3. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    Thanks for the suggestion, Dari! Good timing on this request, as we are almost done with the next update. We made it so when you crouch, the AI's attackRange is reduced by the sneakRangeMod amount, which is 0.4 by default. This leads to some more interesting gameplay that you can try out in the preview dev build posted below.


    Hi inglipX, the update itself is complete, but we are taking some time to make the documentation more helpful by adding descriptions of all scripts and their customizable variables, instead of just covering the scripts used by the Realistic FPS Prefab object. This will probably take a few days, and then the update will be submitted for review, which can take up to a week. We will definitely keep you guys up to speed via this thread when all this takes place.

    Also want to thank everyone who has taken the time to give us feedback and suggestions, you've helped us improve this project greatly. The preview dev build web player has been updated as well, so you can try that out here:


    Here are the changes in the new version:


    • [*=1]Made weapon sprinting animation return to center sooner after player starts falling.
      [*=1]Unhid the mouse cursor when paused (or timescale = 0).
      [*=1]Added collider sweep in front of player to allow better jumping over stationary obstacles.
      [*=1]Fixed sights not rising if sprint is cancelled, but sprint and forward buttons are still held.
      [*=1]Added an extra check to make animated camera angle values return to zero when not playing animations. This prevents rare occurrences of the weapon and camera becoming misaligned.
      [*=1]Added muzzleLightDelay to WeaponBehavior.cs to define delay before muzzle light begins fading.
      [*=1]Added muzzleLightReduction to WeaponBehavior.cs to define speed of muzzle light fading.
      [*=1]Changed name of "childNum" var in PlayerWeapons.cs to "currentWeapon" for clarity.
      [*=1]Added defaultFov var to Ironsights.cs to allow the default camera FOV to be customized.
      [*=1]Added sprintFov var to Ironsights.cs to allow the camera FOV while sprinting to be customized.
      [*=1]Added weaponCamFovDiff var to Ironsights.cs to allow the weapon camera FOV to be customized. This value is subtracted from the main camera FOV to control the perspective of weapon models.
      [*=1]New Footsteps.cs script defines different footstep sounds and landing sounds per surface type.
      [*=1]New WeaponEffects.cs script defines weapon impact effects, impact marks, and weapon impact sound effects per surface type.
      [*=1]Moved weapon effect vars and functions from WeaponBehavior.cs to new WeaponEffects.cs script.
      [*=1]Pain Screen Kick Amt of FPSPlayer.cs now can be used to set magnitude of screen kicks when player takes damage.
      [*=1]Added the var myWaypointGroup to AI.js and added the waypointGroup var to AutoWayPoint.js script to set waypoint groups for NPC patrols.
      [*=1]Fixed doPatrol behavior in AI.js so NPCs stand watch if not patrolling.
      [*=1]RandomSpawnChance of AI.js can be used to make NPCs have a random chance of spawning.
      [*=1]Airborne NPC character controllers now move to the ground when scene is loaded.
      [*=1]Added waypointNumber var to AutoWayPoint.js to define the path order of waypoints that the NPC will patrol starting from number 1 and returning from the last numbered waypoint in the waypoint path group.
      [*=1]Locked mouselook roll in SmoothMouseLook.cs to prevent gun rotating with fast mouse movements.
      [*=1]Player can now drop weapons with the droppable value set to true in WeaponBehavior.cs.
      [*=1]Player now drops weapon, falls down, and is affected by physics forces on death.
      [*=1]Added addsToTotalWeps bool to WeaponBehavior.cs and backupWeapon int to PlayerWeapons.cs to allow player's backup weapon to be skipped in auto weapon selection during weapon drops and swaps, to make the backup weapon not be counted toward player's weapon total, and to prevent the backup weapon from being dropped.
      [*=1]The maxWeapons int in PlayerWeapons.cs now defines the maximum amount of weapons that can be held at one time.
      [*=1]WeaponPickup.cs will now read its removeOnUse bool and the dropWillDupe bool in WeaponBehavior.cs to determine if the current weapon should be dropped or destroyed when picking up a new weapon.
      [*=1]The player's crosshair now changes to an "X" reticle if the player can't pick up the weapon under the crosshair, such as when the player has already picked up the weapon from an armory (dropWillDupe set to true) and can't drop the weapon due to this allowing ammo duplication exploit.
      [*=1]Added unique Texture2D vars to item pickup scripts to allow custom pickup reticles/icons.
      [*=1]Added showAimingCrosshair to WeaponBehavior.cs to selectively disable aiming crosshair for weapons like sniper rifles.
      [*=1]Added useSwapReticle var to FPSPlayer.cs to toggle the display of the swap reticle if the weapon pickup under player's crosshair will be switched or swapped with current weapon.
      [*=1]Improved cancelling of non-magazine reload if fire button is pressed and player has loaded at least 2 shells/bullets.
      [*=1]Prevented switching weapon during non-magazine reload from causing neutral anim glitch and delay at the start of next reload for that weapon.
      [*=1]playerHeightMod and crouchHeightPercentage in FPSRigidbodyWalker.cs will now control standing and crouching height of player.
      [*=1]WaterZone.cs script can be attached to a box trigger collider to control player swimming and water effects.
      [*=1]Added MarkDuration to FadeOutDecals.cs to define the time that impact marks should stay before fading.
      [*=1]WorldRecenter.cs now prevents spatial jitter of game objects due to floating point precision loss and allows much larger scenes to be used.
      [*=1]Made objects that are set to layer 9, the "Ragdoll or Usable" layer, run any ActivateObject() functions in their scripts if the player presses the use button when object is in the crosshair.
      [*=1]By default, the P button now pauses the game.
      [*=1]barrelSmokeShots in Weaponbehavior.cs now defines number of shots required to make smoke rise from gun barrel.
      [*=1]Glass surface type added with its own BreakGlass.cs script and prefab.
      [*=1]MineExplosion.cs can be attached to a game object to create landmines.
      [*=1]ExplosiveObject.cs can be attached to a game object to make it explode after being damaged.
      [*=1]Made the zoom and sprint button behaviors selectable between toggle, hold, or both (tap to toggle, press to hold).
      [*=1]MonsterItemTrap.cs can be used to spawn enemies and create ambushes when player activates or uses an item.
      [*=1]MonsterTrigger.cs can be used to spawn enemies and create ambushes when player enters a trigger zone.
      [*=1]VaultTrigger.cs can be attached to a trigger near a ledge to allow the player to climb themselves up it.
      [*=1]VaultTriggerActivate.cs can be used to create a trigger that will reactivate a vault trigger that has disabled its collider after player has vaulted from it.
      [*=1]Fixed non magazine reloads with bulletsToReload amount greater than 1 not counting reloaded bullets correctly.
      [*=1]Made jump and crouch buttons move player up and down a ladder trigger if they aren't holding a forward or backward move button already.
      [*=1]Added Zombie NPC prefab with animations, sound, and ragdoll.
      [*=1]targetPlayer var of Ai.js will now determine if NPC should ignore player.
      [*=1]Made the raycast length for item pickups scale with the playerHeightMod amount.
      [*=1] The attack range of NPCs will now be reduced by the crouchRangeMod amount of AI.js when player is crouching (for basic stealth gameplay).
    Please feel free to try out the dev build web player above and let us know what you think.


    Shouldn't be to difficult, AusAndrew19. This is actually on our list for the next version. Lod3 brought this up a while ago and here are some ideas:

    Most of the changes would be to the Ironsights.cs, FPSPlayer.cs (handles GUI/HUD elements) and WeaponBehavior.cs scripts. The 2d sniper reticle overlay could be rendered just like the crosshair, but stretched to cover the whole screen. The method we mentioned above would allow for the player to see the weapon being raised, and then switching to the 2d sniper reticle. A simpler way would be just to instantly fade in the 2d sniper reticle and move the weapon out of the view for a time so the player doesn't see it suddenly disappear when its Mesh Renderer component is disabled.

    If you have any questions about how to specifically implement this on your own, please let us know. Otherwise, if you can wait until the update after the upcoming one, the 2d sniper reticle feature should be implemented then.
     
    Last edited: Jul 6, 2013
  4. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    618
    @Azuline

    Could you briefly touch on how specifying footstep/weapon effect sounds was implemented, and if you're using materials to accomplish this? With materials, this would mostly prohibit the use of Texture Atlases, which is why I ask.
     
  5. inglipX

    inglipX

    Joined:
    Aug 9, 2012
    Posts:
    30



    THANK YOU VERY MUCH, all of this looks great. However, the webplayer isn't working... i have it downloaded but it tells me to install it and when i go to the wbeplayer download the website is an error -.-.. :(

    A question: I made a flashlight model in blender. How can i implement it with the fps hands that you use for the katana, pistol , etc.? I want to pick it up and have it wrapped in a hand . Thank you!
     
  6. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    Sure lod3, the footstep and weapon effects are determined by the tag the game object is assigned to. So an object labeled "Metal" "Wood" "Dirt" ect. will play effects for that surface type. This method is compatible with texture atlases, but the surface type will be applied to the whole game object, so as a work-around for this, you can place box colliders in front of different parts of a continuous mesh that has another tag assigned to it. Hope this answers your question.


    No problem inglipX! Does the Unity web player window show the Unity logo and the error message? If so, you can try right-clicking on it and experimenting with different Release Channel choices to see if you can find one that works for you.

    You could use the flashlight by duplicating the Katana_Anim.fbx file in the Assets\!Realistic FPS Prefab Files\Models\Weapons folder. And then creating a new weapon following this video tutorial and use the duplicated Katana_Anim.fbx file as the mesh object. Then you could select the visible katana weapon model in Unity, hide the left hand, rotate the right hand up roughly 90 degrees so the clenched hand is pointing up instead of forward, and replace the katana model with your flashlight model so the flashlight is pointing forward. Please let us know if you need help with anything else.
     
  7. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    618
    Was the answer I was hoping for ;)

     
  8. AusAndrew19

    AusAndrew19

    Joined:
    Jun 6, 2012
    Posts:
    16
    Tried out dev demo.. Its awesome.. I'll just wait lol.. Will this new update still be compatible with 3.5?
     
  9. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    273
    Hi Azuline, the demo looks great! Love the nice new additions such as the zombies and mines.:D
    You may already be including this, but it would be great to have a step-by-step guide on how to incorporate our own models to be used with the enemies.
     
  10. inglipX

    inglipX

    Joined:
    Aug 9, 2012
    Posts:
    30

    Hey I figured out the demo issue :) Looks great! Maybe some gore when shooting the zombie would be nice :D


    With the flashlight i used the katana and made my own Ready animation. But when i swing the flashlight(i want to use as melee too) it does the swing animation but returns to a weird tilted pose, not the original Ready animation that you first see: (Ignore those attached images, i cant remove them for some reason :p)
    Heres a video of it:

    https://www.dropbox.com/s/9kts91xiaute0oh/Unity 2013-07-07 11-42-59-838.avi


    The 2nd image you see if u wanted to know is an issue that i have fixed. This is when i used the Ready animation that the katana had used.
     

    Attached Files:

    Last edited: Jul 7, 2013
  11. wmgcata

    wmgcata

    Joined:
    Jul 20, 2012
    Posts:
    169
    Could it be possible to add first-person to third-person toggling? And have a real character moving around instead of an empty gameobject with only an arm model? If there's any way to add this then i'll definitly buy this package!

    Edit : And if possible some function that checks if the enemy's head is hit or another part of the body, to make sure that a headshot deals more damage then a chest shot etc...

    Tim
     
    Last edited: Jul 7, 2013
  12. djary

    djary

    Joined:
    Oct 17, 2012
    Posts:
    85
    hi
    i have 1 cube when CharacterDamange attached to this (cube)
    this script dont work !
    why ?
     
  13. Dari

    Dari

    Joined:
    Mar 25, 2013
    Posts:
    130
    Will it be possible to add new bullet marks textures and sounds for example concrete (brick, stone wall) also new particles to it, thanks! :D
    By the way, update is AWESOME! Zombies spawn when I pickup items or come somewhere in trigger collider, water system is great made... Everything is... Perfect, thanks for making such a good updates!
    EDIT: concrete footsteps sounds also, is that possible? :D
    Where have you found the zombie model?
     
    Last edited: Jul 7, 2013
  14. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    Great! Using material id's or a material naming convention to find the surface type would be simpler in some ways, but as you said, tags seem to be the more efficient approach.


    Thanks AusAndrew19, we plan on keeping the asset compatible with 3.5 as long as possible, so far there is only one major difference between 3.5 and 4.x that we have to accommodate (SetActive SetActiveRecursively). So 3.5 compatibility isn't too much trouble.


    Glad you like the new additions, Eyehawk! We will definitely create a step-by-step guide on how to use new character models. The process is pretty standard/repeatable with the only exception being how the character mesh is imported and how the scripts and NPC-related components (character controller, audioSource) need to be added to the object that the Animation Component is attached to. We also had great results using the ragdoll wizard for the zombie model.


    Thanks for the suggestion, inglipX, we'll add some better zombie hit effects. For your flashlight question, have you set the flashlight mesh to layer 8, the gun layer? That will prevent the weapon model from becoming misaligned in some situations. I also wasn't able to see the video that you uploaded, it just shows up as a black screen, but I can hear the sounds.

    If you created a new attack animation for the flashlight, you should also set its animation wrap mode to Clamp Forever so the weapon will stay in position after playing the attack animation, where the Ready animation's clamp mode should be set to Once. Hope that might give you some ideas.


    Hi wmgcata, a thirdperson mode is on our list for a future update. Adding the thirdperson feature is very possible because the player states for walking, sprinting, swimming, crouching, and jumping are present in the scripts. All that's needed is for the first person weapon models to be deactivated, set up code to make the thirdperson player model hold different weapons, and then write a script that would read the player states and play the various animations of the player model. Also, in a multi-user environment, a client ID system could be set up where all clients but the player (if they are in first person mode) would be rendered in thirdperson mode.

    Edit: The main camera and mouse input would need to be handled differently as well in third person mode (changed from mouse look to mouse orbit around player or similar method ).

    So we definitely have a plan on how to approach thirdperson mode. If you'd like some more information about this or if you'd like to try implementing thirdperson on your own before we do, please let us know and we can give you some suggestions.

    Hit detection could also be implemented by determining where the weapon rayCast hits the NPC's capsule collider. This could be done by creating zones on the capsule collider proportionate to its bounds.max and bounds.min values. So a head shot would register on something like: bounds.max - headHeight, a leg shot as: bounds.min + legHeight, with the remainder height on the collider registering as a chest shot. These changes could probably all be applied to the CharacterDamage.js script. Hope that answers your questions.


    Hi djary, first of all, you can try setting the cube to layer 10, the world collision layer, or layer 13, the NPCs layer, to see if the box will have its hit points reduced when damaged by a weapon. Please note that in the next version, adding just the CharacterDamage script to a cube that isn't an NPC is not suggested, as it will be better to use the ExplosiveObject.cs script and modify the damage parameters and effects. You might also want to look at this blog post for some more information on how damage amounts are applied between the scripts.


    Adding new surface types like you described is definitely possible. It will take some simple modifications to the WeaponEffects.cs or Footsteps.cs scripts so the weapon or player rayCast can check other surface types like "Stone" or "Brick". We will write a guide on how to make these edits which will involve just some copying and pasting existing tag checks, changing the name of the surface type tag check, and adding new public variables so the surface effects can be selected from the inspector.

    Glad you're liking the new webplayer, Dari! We put a lot of time and thought into how we wanted the new features to work. The zombie model is a public domain asset released by PixelHouse. We made some additional animations and optimized the mesh for use in Unity.
     
    Last edited: Jul 8, 2013
  15. djary

    djary

    Joined:
    Oct 17, 2012
    Posts:
    85
    dont work !
    edit :

    must add "layer 10" to layers :|
     
    Last edited: Jul 9, 2013
  16. AusAndrew19

    AusAndrew19

    Joined:
    Jun 6, 2012
    Posts:
    16
    @Azuline,
    That's great to read, Thank you for the time to reply back and looking forward to the update and ones to come :) Keep up the fantastic work, :)
     
  17. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    273
    Hi Azuline,
    I've been having a go integrating EasyTouch 2.0 joysticks with RFPS.

    Because RFPS is currently set up to use keyboard, movement is binary (e.g. for forward movement you set inputY=1 {Button Pressed under FPSRigidBodyWalker.cs}).

    However with virtual joysticks you can vary the speed depending on how far from the centre the joystick has been pushed. Is there an easy way to alter the script so that it can do that?
     
  18. Z00MBY_Alex

    Z00MBY_Alex

    Joined:
    Jul 10, 2013
    Posts:
    7
    Hello! I found a strange bug. Weapons the player shakes, if coordinates of the player on the map more than 100-500 on both axes.

    Here's the video. The coordinates of the player X:1736 Y:31 Z:3826



    How to fix this bug???
     
  19. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    Hi djary, so you are trying to add the CharacterDamage script to a cube and have the cube take damage? You might want to try removing or commenting out this line of CharacterDamage.js:

    Code (csharp):
    1.     transform.GetComponent(AI).attackRangeAmt = transform.GetComponent(AI).attackRange * 3;
    because it refers to another AI script, which a cube with only the CharacterDamage script won't have. I just tested this, and commenting out or removing this line and setting the box to layer 10 should let you shoot and destroy the cube if it has a CharacterDamage component. Please let us know how this works for you.


    Thank you AusAndrew19! Not a problem :)


    Sure, the FPSRigidBodyWalker script was originally written using Input.GetAxis calls, but we switched to the key press method to have more control over the player's movement. You could try changing inputX and inputY to floats and replacing this code around line 155 of FPSRigidBodyWalker:

    Code (csharp):
    1.  
    2.                 inputXSmoothed = Mathf.Lerp(inputXSmoothed,inputX,Time.deltaTime * InputXLerpSpeed);
    3.                 inputYSmoothed = Mathf.Lerp(inputYSmoothed,inputY,Time.deltaTime * InputYLerpSpeed);
    with something like this:

    Code (csharp):
    1.                 inputYSmoothed = Input.GetAxis("Vertical");
    2.                 inputXSmoothed = Input.GetAxis("Horizontal");
    3.                 inputY = inputYSmoothed/2.0f;
    4.                 inputX = inputXSmoothed/2.0f;
    ...and you should be able to move the character using Unity's default axis input that you can set to use a physical joystick. Maybe EasyTouch 2.0 can pick up the Input.GetAxis calls for its virtual joysticks? Some features might be affected (we haven't tested this) but the basic movement seems to work. Hope that helps, Eyehawk.

    Edit: Just found out that there are more GetKey/GetKeyDown checks that have to be changed if you want to use all features with joystick axis input. We added a var called useAxisInput to the FPSRigidBodyWalker script that can be set to true to use the joystick axes for input that will be included in the new version.


    Hi Z00MBY_Alex, this is a known issue and is due to floating point precision loss the further the player moves from the scene origin. Our weapon models use a nested hierarchy with bones (instead of a single weapon mesh) which compounds the issue, or so we've read. The trade off is that you can swap out parts of our weapon models with your own meshes, so we think it's worth it.

    The good news is that we have a solution for this issue that will be part of the next update which will potentially allow infinite sized scenes if the other systems can maintain accuracy as well. Hope the wait won't be too much of an inconvenience.


    And on that subject, we're almost done with the new docs, which will explain all the scripts used in the asset to some degree. Then we just need to do a few more small tests and the update should be ready. Also, we recently identified an issue with our platform and elevator riding method which can result in inconsistent movement while riding the platform or elevator at higher frame rates if you have vsync disabled (it's not very noticeable at framerates < 75). So we just wanted to let you guys know we are aware of this issue and that we are working on a fix, but it probably won't be a part of the upcoming update. Thanks for your support and patience.
     
    Last edited: Jul 11, 2013
  20. Z00MBY_Alex

    Z00MBY_Alex

    Joined:
    Jul 10, 2013
    Posts:
    7
    Thanks for Your answer! I will wait for the update!
     
  21. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    No problem! The docs are finished now and we also fixed the platform movement issue I mentioned earlier which involved the rigidbody interpolation method. As a result, the default FixedTimeStep value of the asset will no longer be set to 0.01 in FPSPlayer.cs and will use the inspector setting (0.02 default), since the new method allows for smoother motion and flexibility for a wider range of Timescale, Fixed Timestep, and framerate speeds. The lower Fixed Timestep value (50fps instead of 100fps) should offer better performance and not put as much strain on Unity's physics system too. Very happy about this :)
     
  22. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    273
    EDIT:
    Hey Azuline,

    I missed seeing the other answer re: Easy Touch embedded to my other question above yesterday - thanks and looking forward to the update :D
     
    Last edited: Jul 12, 2013
  23. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,059
    Does this mean we're close to seeing a new version in the asset store soon?
     
  24. scottmakesgames

    scottmakesgames

    Joined:
    Jul 13, 2013
    Posts:
    2
    Hi there I had a question. I was wondering how to make it so you can throw things like you can throw guns and ammo.
    Thanks
     
  25. AusAndrew19

    AusAndrew19

    Joined:
    Jun 6, 2012
    Posts:
    16
    I tried to disable weapon holder renderers when im climbing so it looks more real since you can really climb a ladder with no hands rofl... But this wouldn't work since i have limited knowledge on scripting, So any help would be appreciated :)
     
  26. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    Greetings!

    First of all I must say that I'm enjoying this pack a LOT, I'm building my survival horror game based on this FPSkit and it's been good so far. My problem is :

    - I want to change the recoil kickback, instead of the camera returning back to it's original position, I want to make it that when you shoot the gun camera goes up and stays there, kinda like this :



    Here's the code which I believe that addresses this issue, but I don't know how to switch it into my liking.

    Code (csharp):
    1.  
    2. //Set rotation quaternion to random kick values
    3.         kickRotation = Quaternion.Euler(Camera.main.transform.localRotation.eulerAngles - new Vector3(kickUpAmt * 1, Random.Range(-kickSideAmt * 2, kickSideAmt * 2), 0));
    4.         //smooth current camera angles to recoil kick up angles using Slerp
    5.         Camera.main.transform.localRotation = Quaternion.Slerp(myTransform.localRotation, kickRotation, 0.1f);
    - Also, any way to change the random spread mechanic to a Cone of Fire one? kinda like in the popular FPS games like COD of BF3 where if you stay still the weapon would be more accurate, but once you move or hold the fire button down it gets bigger and the spread gets worse.


    - Last, how can I increase the "breath sway" while holding the gun in ironsights mode? When you aim the gun points at the same direction without any movement, countering the weight breath movement of the body. I want to increase or add sway to the ironsight mode that moves the gun around in the X and Y axis in a random pattern. Kinda like this:




    I'm sorry for asking too much but I've been searching for days on google and changing the codes around but I can't find a solution, so why not ask the guy who made this wonderful FPS kit that I'm using?

    Thanks.
     
  27. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    Great! Let us know if you have any other questions Eyehawk.


    It does. Really sorry about the previous estimates of a release date that we missed. These things can be difficult to predict, but today we reached our feature-complete goal for this version so there is just some minor cleanup to be done now. The update really is an improvement on 1.16, so we're planning to get it out to you guys soon :)


    Hi scottmakesgames, to throw an object with a rigidbody component, you just have to instantiate it from the Project Library in front of the player using Object.Instantiate and apply forward motion to it using Rigidbody.Addforce and rotation using Rigidbody.AddTorque. In the new version you can look at the DropIndicatedWeapon(weapon) function in PlayerWeapons.cs for a specific example. Hope that at least gives you some ideas for a starting point!



    Sure AusAndrew19, there is code implemeted to lower the weapon when switching which is found in PlayerWeapons.cs that looks like this: IronsightsComponent.switchMove = -1.2f; This code sets the switchMove variable of the Ironsights script to a negative value which moves the weapon down and off the screen. You would just have to add some code to set switchMove to a negative value when the climbing var of FPSRigidBodyWalker.cs is true. We will look into adding this for the update, but if this feature doesn't make it in, we can write a guide for you.


    Glad you're enjoying the asset, BioXide! Good job on finding that code, it is what causes the view recoil when firing. The code that returns the view to center after the recoil kick and other camera animations is on line 58 of CameraKick.cs. Adding an option for the non-recovering camera recoil can be something we look into, as it would take a little rework of our current camera kick and smoothing method. Hope that's not too much of an inconvenience.

    For your second question, the asset does modify the firing accuracy based on crouch, zoomed, and semi autio states, so it would be fairly simple to implement a sustained fire weapon accuracy spread. That code can be found in the SprayDirection() function of WeaponBehavior.cs. There you will find some condition checks which modify the shotSpreadAmt value and affect weapon accuracy. You can try increasing the shotSpreadAmt when the player fires continuously and have it cool-down to zero after a time. We will also plan to add this in a future update.

    To increase the weapon sway while aiming, you can edit this code around line 222 of Ironsights.cs:

    Code (csharp):
    1.                     idleX = Mathf.Sin(Time.time * 1.25f) / 4800.0f;
    2.                     idleY = Mathf.Sin(Time.time * 1.5f) / 4800.0f;
    ...and decrease the 4800.0f amount to 600.0f. The only issue with this is that the gun will sway more, but the weapon raycast of the FireOneShot() function in WeaponBehavior.cs still shoots at the center of the screen. To fix this, the weapon rayCast can be modified to line up with the weapon mesh's position. This would be something good for us to implement in a future update as well when we add improved sniping overlays.

    Thank you for your questions! They really help us in knowing what features we should be adding in updates. I wish I had time to go into more detail about these fixes, but we've been very busy finalizing the next update. If there's anything else you're wondering about, please let us know.
     
  28. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    My god... that was fast.. >.>

    Thank you so much, I'll let you know how it went when I implement the codes later on, waiting for that update. :D


    EDIT: Alrighty, I managed to implement the weapon sway perfectly, now the only problem is finding out how to link the raycast of the gunfire to match the barrel of the guns like you said, any tips or pointers you might give me?

    I tried changing the camera kick thing but it just kicks the camera upwards, leaving the hands in the same X, Y position.
     
    Last edited: Jul 13, 2013
  29. inglipX

    inglipX

    Joined:
    Aug 9, 2012
    Posts:
    30
    Hey Azuline, i have a small issue with my scriping in javascript. So i press a key to freeze rigidbody rotation and i press a different key to freeze the position.. How could i now unfreeze the rotation whilst keeping the position still frozen? Thank you
     
    Last edited: Jul 14, 2013
  30. wickedpuppy

    wickedpuppy

    Joined:
    Nov 6, 2012
    Posts:
    2
    Hi ,

    Just bought the prefab , amazing! Just one question... why do I see waypoints when I play? As white hovering boxes.. Shouldn't they be invisible? Thanks!

    EDIT : Hmms ... when I build to .exe , then those boxes no longer show... but why do they show up with I run the game in Unity?
     
    Last edited: Jul 14, 2013
  31. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    Great! For the camera kick, I might've misunderstood what you were asking. To actually achieve the non-recovering recoil, you could do the same thing to the mouse input instead of the camera angles. This involves a bit more coding to make the angles stay in the max and min amounts. But not to worry, as we just implemented this feature today, since it was a lot simpler than modifying the camera methods. So you can expect to see it in the upcoming update (new vars: useViewClimb, viewClimbUp, viewClimbSide, and viewClimbRight in WeaponBehavior.cs). And about the gun swaying while aiming, we'll have to get back to you on that, as we are still researching how to keep the sights and rayCast aligned. Thanks for your feedback, BioXide!


    Hi inglipX, first of all, do you know how the rigidbody's rotation and position are being frozen in your script? Is your code using Rigidbody.constraints by any chance? Maybe you could try setting RigidbodyConstraints.FreezePosition and keeping the rotation unfrozen? I haven't tried this myself, but here is a page that discusses how to freeze rotation and position of rigidbodies, and also another one about using bit masks to selectively freeze different axes. Hope that can at least give you some ideas.


    Thanks wickedpuppy! The waypoints are visible in the editor just so you can see where the NPCs will be patrolling, you can hide them by selecting the waypoint->cube object in the hierarchy window and disabling the cube's mesh renderer component. The reason the cubes aren't visible in the built exe is that they have the EditorOnly tag applied to them. Feel free to let us know f you have any other questions.


    Just so you know, AusAndrew19, this feature will be in the upcoming update as well. If the lowerGunForClimb var of FPSRigidBodyWalker.cs is true, the player will now lower their weapon offscreen when climbing ladders. It does seem more realistic this way :)
     
    Last edited: Jul 14, 2013
  32. wickedpuppy

    wickedpuppy

    Joined:
    Nov 6, 2012
    Posts:
    2
    Thanks Azuline. I have also bought a explosion package and trying out with the objects in the fps. In order to trigger it , I just need to send the object a message. Just wondering where do I trigger this method? The package is "Mesh Explosion" , in case someone has asked about this before.

    For example , 3 crates behind the house at the beginning of the game , near the ladder. How and where do I call the method to explode them when I hit them with the rifle?

    Something like ...

    if hit by a bullet {
    ...
    do something <-- here is where I call the method to explode , burn or whatever
    ...
    }

    Thanks.

    PS : If this sounds noob , I am just starting , and there are already tutorials on this , just let me know. I go read them up.
     
  33. inglipX

    inglipX

    Joined:
    Aug 9, 2012
    Posts:
    30

    Hey Azuline, EDIT* I have fixed it, here was my solution:
    Code (csharp):
    1. if(GUI.Button(Rect(10,175,200,20),"Freeze Rotation = " + freezeRot)  !rotateEnable) {
    2.     freezeRot = !freezeRot;
    3.     }
    4.    
    5.     if (freezeRot == true)
    6.     {
    7.    
    8.  
    9.     objectSelected.rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationZ;
    10.    
    11.     }
    12.    
    13.        
    14.     if (freezeRot == false)
    15.     {
    16.    
    17.  
    18.    
    19.     objectSelected.rigidbody.constraints = ~(RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationZ);
    20.     }
    21.    
    22.  
    23.    
    24.  
    25.    
    26.    
    27.     if(GUI.Button(Rect(10,200,200,20),"Freeze Position = " + freezePos)) {
    28.     freezePos = !freezePos;
    29.     }
    30.    
    31.     if (freezePos == true)
    32.     {
    33.     objectSelected.rigidbody.constraints = RigidbodyConstraints.FreezePositionX | RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezePositionZ;
    34.    
    35.     }
    36.    
    37.     if (freezePos == false)
    38.     {
    39.    
    40.     objectSelected.rigidbody.constraints = ~(RigidbodyConstraints.FreezePositionX | RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezePositionZ);
    41.     }
    42.    
    43.    
    44.    
    45.    
    46.    
    47.    
    48.     if (freezePos  freezeRot){
    49.    
    50.     objectSelected.rigidbody.constraints = RigidbodyConstraints.FreezeAll;
    51.    
    52.     }

    Additionally i am trying to rotate an object by using the + and - keys and selection of which axis you want to rotate on with the x y z keys. It all works nicely that i can pick my different axes but however the rotation is very odd and at times slows to a smooth then quickly speeds up... its quite odd. here is my code:

    Code (csharp):
    1. if (Input.GetKeyDown("r")  objectSelected){
    2.    
    3.         rotateEnable = !rotateEnable;
    4.    
    5.     }
    6.    
    7.     if (!rotateEnable){
    8.     xR = false;
    9.     yR = false;
    10.     zR = false;
    11.    
    12.     }
    13.    
    14.     if (rotateEnable){
    15.    
    16.         scalingEnable = false;
    17.    
    18.         if (Input.GetKeyDown("x")){
    19.             xR = true;
    20.             yR = false;
    21.             zR = false;
    22.             }
    23.             if (Input.GetKey("=")  xR)
    24.             {
    25.             objectSelected.transform.rotation.x +=.05;
    26.             }
    27.             if (Input.GetKey("-")  xR)
    28.             {
    29.             objectSelected.transform.rotation.x -= .05;
    30.             }
    31.         if (Input.GetKeyDown("y")){
    32.             yR = true;
    33.             zR = false;
    34.             xR = false;
    35.             }
    36.             if (Input.GetKey("=")  yR)
    37.             {
    38.             objectSelected.transform.rotation.y += .05;
    39.             }
    40.             if (Input.GetKey("-")  yR)
    41.             {
    42.             objectSelected.transform.rotation.y -= .05;
    43.             }
    44.         if (Input.GetKeyDown("z")){
    45.             zR = true;
    46.             yR = false;
    47.             xR = false;
    48.             }
    49.             if (Input.GetKey("=")  zR)
    50.             {
    51.             objectSelected.transform.rotation.z += .05;
    52.             }
    53.             if (Input.GetKey("-")  zR)
    54.             {
    55.             objectSelected.transform.rotation.z -= .05;
    56.             }
    57.        
    58.        
    59.       }
     
    Last edited: Jul 14, 2013
  34. Z00MBY_Alex

    Z00MBY_Alex

    Joined:
    Jul 10, 2013
    Posts:
    7
    Hi Azuline!
    You can make the new release of the view without weapons? Empty hands. And melee weapons, flashlight that can Shine?
     
  35. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    Sweet, looking forward to that update, loving the support, if you throw any other packs in the future which complement this one (weapons, parkour system, etc) I would buy it just to support this great work.

    (Anyways, rather offtopic here but I threw a vid showing what I got so far in my game, just in case you wanted to see a different perspective from your FPS pack.)

     
    Last edited: Jul 15, 2013
  36. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    Great product by the way.

    I have one question, how do i get the gun fire decals to work on my custom buildings?

    I've been going through your code to try and find an array that holds objects that can receive decals. I'm assuming there is one, because when i shoot at any other buildings that are not apart of your prefab it just doesnt seem to work. I've compared both in the inspector and it looks the same, so thats why i assume there must be an array storing them ?
     
  37. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,059
    It's done with layers. Try setting them to World Collision.
     
  38. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    Thanks Drewradley... I had to have on "Destructable" layer :)
     
  39. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,059
    So the inspector wasn't quite the same. :) Always check layers and tags.
     
  40. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    Sure, no problem wickedpuppy! To make an object take damage from the Realistic FPS Prefab's weapons, you just need to set the object to layer 10, the World Collision layer so they will be detected by the weapon rayCast. Then it just needs a script attached to it that has a function called "ApplyDamage(damage)" which is called when the weapon rayCast hits an object. Here is a blog post that goes into more detail on that subject.

    You can also see an example of this by opening the CharacterDamage.js script. In that script, the object's hitpoints are reduced by the "damage" amount of the ApplyDamage(damage) function call made by the weapon rayCast in WeaponBehavior.cs. You can either use CharacterDamage.js and comment out this line to prevent an error if it is placed on a non-NPC object:

    Code (csharp):
    1.     //transform.GetComponent(AI).attackRangeAmt = transform.GetComponent(AI).attackRange * 3;
    Or you can write your own script that has an ApplyDamage(damage) function you can attach to objects. With CharacterDamage.js, you can try calling the function from the Mesh Explosion package that explodes meshes in the Detonate() function of CharacterDamage.js Also in the upcoming version, there will be two new scripts called ExplosiveObject.cs and BreakableObject.cs which you can use or modify for this purpose as well. Hope that helps.



    Nice job on figuring that out, inglipX! The inconsistent movement you described sounds like it might have to do with the framerate fluctuating and some of your code being framerate dependent. If this code is in the Update() or LateUpdate() loop and getting called every frame, you can try changing these statements:

    Code (csharp):
    1.    objectSelected.transform.rotation.x +=.05;
    To something like this:

    Code (csharp):
    1.    objectSelected.transform.rotation.x += 50 * Time.deltaTime;
    50 might be too fast or slow, so you'll have to test it. The second problem might be that there are Input.GetKey calls nested inside Input.GetKeyDown blocks. GetKeyDown is only true for the frame that the button was pressed, where GetKey is constantly true when the button is held down. If you're trying to rotate the objects over several frames with GetKey, you can try changing the GetKeyDown calls for the x, y, and z keys to GetKey, so they will run the code in their block for more than one frame and allow rotation.

    Third issue that could be happening is the script is trying to modify the Transform.rotation Quaternion of the objects. Do you mean to be rotating the object's eulerAngles instead? You can rotate a Quaternion using Quaternion.eulerAngles, though. I might try doing something like this:

    Code (csharp):
    1.    objectSelected.transform.eulerAngles.x += 50 * Time.deltaTime;
    If your rotation was working, just inconsistently, it might another one of the other two issues I mentioned above. (javascript might convert the quaternion calls to eulerAngle calls behind the scenes, not sure). Hope that at least gives you some ideas!



    Hi Z00MBY_Alex, do you mean having the player's hands held in front of them like a zombie walk, or fists? You can try duplicating a weapon mesh, hiding/deleting the weapon mesh, rotating the hands into position, and disabling the animation component so the hands won't go back to their animated position. Those all sound like good ideas and we'll plan to get them in the update after the upcoming one :)



    Nice video BioXide! Really great atmosphere and use of the prefab! Definitely would like to see how your project moves forward from here. Also just so you know, for the upcoming update we implemented your recoil suggestion where the weapons loose accuracy with sustained fire. It works really well and adds realism. Thanks again!



    Glad you guys figured this out! drewradley's right that the asset uses layers to organize hit detection groups. In the next version, tags will be used to define surface types as well as a new script called WeaponEffects.cs which will include arrays to reference image, particle, and sound effects for weapon impacts. If you have any more questions, please let us know.
     
    Last edited: Jul 16, 2013
  41. inglipX

    inglipX

    Joined:
    Aug 9, 2012
    Posts:
    30
    Thank you Azuline! I changed it to eulerAngles and it fixed it.
    Also, is there a way i could implement the Rigidbody walker that you use on the player as a standalone controller similar to the FPSWalker scripts that you find on the wiki? I am trying to implement a player without the weapons attached at the moment or any of the other affects besides the rigidbody walker and the headbob that you use. Thanks!

    2nd question: On the mouselook script, i am tyring to face my camera up and look side to side (as if you are lying down) however, when i give mouse input the x rotation changes to 360 and i am stuck on the x rotation. thank you
     
    Last edited: Jul 16, 2013
  42. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    Great to hear that worked for you inglipX! To use just the Rigidbody walker, you can import the Realistic FPS Prefab as usual, and select and disable the FPS Weapons object and its children. This will deactivate the weapon behaviors and just allow you to move in the world and interact with objects. You should also remove/disable any weapon or ammo pickups from your scene to prevent errors.

    If you want to delete the FPS Weapons object, you might have to search through some of the scripts and delete/comment-out the lines referring to weaponObj or gunObj to prevent null references. Ironsights.cs would be a good place to start, as it gives an error without a weaponObj reference. One nice thing about Unity is that it knows when you’ve disabled a script component or object and won’t display a null reference as other components try to access it.

    To make the mouse move like the player is lying down, you could try reversing the rotations in SmoothMouseLook.cs like this:

    Code (csharp):
    1.             Quaternion xQuaternion = Quaternion.AngleAxis (rotationY, -Vector3.up);
    2.             Quaternion yQuaternion = Quaternion.AngleAxis (rotationX, -Vector3.right);
    And adding this line at the end of the Update() loop to flip the camera 90 degrees:

    Code (csharp):
    1. myTransform.rotation = Quaternion.Euler(myTransform.rotation.eulerAngles.x, myTransform.rotation.eulerAngles.y, 90.0f);
    You’ll also want to have the minimumX and minimumY values set to -85 and the maximumX and maximumY angles set to 85 while the player is lying down. The rotation of the camera while using this code isn’t perfect and it would take some more time to look into how to implement a better solution. The whole camera rotation quaternion should probably be rotated 90 degrees somehow and not just setting the roll to 90 degrees, but hopefully that can help get you started!
     
  43. satre

    satre

    Joined:
    Feb 10, 2013
    Posts:
    11
    Is it possible to convert it into multiplayer with photon cloud easily?
     
  44. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    Hello Azuline Studios, absolutely loving this kit, I'm very glad I chose it :)

    I have a question

    When I shoot at an object, example "Bullseye" a "New Game Object" becomes a child with a "BulletMark3(Clone)" attached to it. After some time the "BulletMark3(Clone)" disappears as expected but the "New Game Object" stays there forever and ever.

    I've changed

    Destroy(clone.gameObject, 30);

    to

    Destroy(emptyObject.gameObject, 30);

    it's better this way :) I think or am i missing something?
     
    Last edited: Jul 17, 2013
  45. inglipX

    inglipX

    Joined:
    Aug 9, 2012
    Posts:
    30
    Thanks Azuline both solutions work!

    Additionally, in the new update can you include a javascript verison of the Footsteps script because ive been trying to make a good footsteps script with different surfaces but i have failed :( also how did you go about different surfaces or textures such as grass, concrete on Terrain to play different footsteps? Thank you
     
  46. Azuline-Studios

    Azuline-Studios

    Joined:
    Apr 5, 2013
    Posts:
    203
    Hi satre, it should be possible to convert the asset to multiplayer with photon cloud, but there is some work that would need to be done. First of all, you would want to determine which scripts and methods should only be calculated client-side, such as particle effects and bullet shell spawning, and what information should be shared or managed with the server/cloud, like the player positions, facing angles, and player states. We plan to implement a third person view soon which would simplify the process of rendering other players. We are always available if you have any more questions or need specific advice on this as well.


    Thank you MoHoe, glad you're enjoying the asset! This was definitely a leftover bug from when the weapon mark method was being worked on. Your finding this is much appreciated! We implemented the same fix that you mentioned. The parent object is only created to prevent the weapon marks from becoming skewed on surfaces. Thanks again!


    Glad the solutions worked for you inglipX! We experimented with creating a javascript version of Footsteps.cs, but there were problems allowing it to read the C# scripts in the rest of the asset and we wanted to upload the new update today. Hope that's not too much of an inconvenience. Footsteps.cs itself is a pretty simple script though and we plan on writing a guide on how to add new surfaces for footstep and weapon impact detection.

    The actual method we used for playing footstep sounds on different surfaces involved reading the rayCast.hit of the player's ground check rayCast in FPSRigidBodyWalker.cs. Then from the rayCast.hit the tag of the game object is found which has been set to "Metal" "Concrete" "Dirt" ect. Footsteps.cs just reads the tag and plays the appropriate sound effects, which have been set in the inspector as public audioClip fields. Hope that helps.


    As for the update, we just uploaded it and it may take a few days to go through the review process. So we suggest that you back up your projects and your version 1.16 unitypackage file if you will need it for testing while moving your project to the new version. Here are the final version notes for 1.17:

    • Made weapon sprinting animation return to center sooner after player starts falling.
    • Unhid the mouse cursor when paused (or timescale = 0).
    • Added collider sweep in front of player to allow better jumping over stationary obstacles.
    • Fixed sights not rising if sprint is cancelled, but sprint and forward buttons are still held.
    • Added an extra check to make animated camera angle values return to zero when not playing animations. This prevents rare occurrences of the weapon and camera becoming misaligned.
    • Added muzzleLightDelay to WeaponBehavior.cs to define delay before muzzle light begins fading.
    • Added muzzleLightReduction to WeaponBehavior.cs to define speed of muzzle light fading.
    • Changed name of "childNum" var in PlayerWeapons.cs to "currentWeapon" for clarity.
    • Added defaultFov var to Ironsights.cs to allow the default camera FOV to be customized.
    • Added sprintFov var to Ironsights.cs to allow the camera FOV while sprinting to be customized.
    • Added weaponCamFovDiff var to Ironsights.cs to allow the weapon camera FOV to be customized. This value is subtracted from the main camera FOV to control the perspective of weapon models.
    • New Footsteps.cs script defines different footstep sounds and landing sounds per surface type.
    • New WeaponEffects.cs script defines weapon impact effects, impact marks, and weapon impact sound effects per surface type and contains effects related functions that were previously a part of the WeaponBehavior.cs script.
    • Pain Screen Kick Amt of FPSPlayer.cs now can be used to set magnitude of screen kicks when player takes damage.
    • Added the var myWaypointGroup to AI.js and added the waypointGroup var to AutoWayPoint.js script to set waypoint groups for NPC patrols.
    • Fixed doPatrol behavior in AI.js so NPCs stand watch if not patrolling.
    • RandomSpawnChance of AI.js can be used to make NPCs have a random chance of spawning.
    • Airborne NPC character controllers now move to the ground when scene is loaded.
    • Added waypointNumber var to AutoWayPoint.js to define the path order of waypoints that the NPC will patrol starting from number 1 and returning from the last numbered waypoint in the waypoint path group.
    • Locked mouselook roll in SmoothMouseLook.cs to prevent gun rotating with fast mouse movements.
    • Player can now drop weapons with the droppable value set to true in WeaponBehavior.cs.
    • Player now drops weapon, falls down, and is affected by physics forces on death.
    • Added addsToTotalWeps bool to WeaponBehavior.cs and backupWeapon int to PlayerWeapons.cs to allow player's backup weapon to be skipped in auto weapon selection during weapon drops and swaps, to make the backup weapon not be counted toward player's weapon total, and to prevent the backup weapon from being dropped.
    • The maxWeapons int in PlayerWeapons.cs now defines the maximum amount of weapons that can be held at one time.
    • WeaponPickup.cs will now read its removeOnUse bool and the dropWillDupe bool in WeaponBehavior.cs to determine if the current weapon should be dropped or destroyed when picking up a new weapon.
    • The player's crosshair now changes to an "X" reticle if the player can't pick up the weapon under the crosshair, such as when the player has already picked up the weapon from an armory (dropWillDupe set to true) and can't drop the weapon due to this allowing ammo duplication exploit.
    • Added unique Texture2D vars to item pickup scripts to allow custom pickup reticles/icons.
    • Added showAimingCrosshair to WeaponBehavior.cs to selectively disable aiming crosshair for weapons like sniper rifles.
    • Added useSwapReticle var to FPSPlayer.cs to toggle the display of the swap reticle if the weapon pickup under player's crosshair will be switched or swapped with current weapon.
    • Improved canceling of non-magazine reload if fire button is pressed and player has loaded at least 2 shells/bullets.
    • Prevented switching weapon during non-magazine reload from causing neutral anim glitch and delay at the start of next reload for that weapon.
    • playerHeightMod and crouchHeightPercentage in FPSRigidbodyWalker.cs will now control standing and crouching height of player.
    • WaterZone.cs script can be attached to a box trigger collider to create a swimmable liquid volume that handles player swimming and water effects.
    • Added MarkDuration to FadeOutDecals.cs to define the time that impact marks should stay before fading.
    • WorldRecenter.cs now prevents spatial jitter of game objects due to floating point precision loss and allows much larger scenes to be used.
    • Made objects that are set to layer 9, the "Ragdoll or Usable" layer, run any ActivateObject() functions in their scripts if the player presses the use button when object is in the crosshair.
    • By default, the Tab button now pauses the game.
    • barrelSmokeShots in Weaponbehavior.cs now defines number of shots required to make smoke rise from gun barrel.
    • Glass surface type added that uses BreakableObject.cs script and prefab.
    • MineExplosion.cs can be attached to a game object to create landmines.
    • ExplosiveObject.cs can be attached to a game object to make it explode after being damaged.
    • Made the zoom and sprint button behaviors selectable between toggle, hold, or both (tap to toggle, press to hold).
    • MonsterItemTrap.cs can be used to spawn enemies and create ambushes when player activates or uses an item.
    • MonsterTrigger.cs can be used to spawn enemies and create ambushes when player enters a trigger zone.
    • EdgeClimb.cs can be attached to a trigger near a ledge to allow the player to climb themselves up it.
    • EdgeClimbTriggerActivate.cs can be used to create a trigger that will reactivate an edge climb trigger that has disabled its collider after player has climbed up it.
    • Fixed non magazine reloads with bulletsToReload amount greater than 1 not counting reloaded bullets correctly.
    • Made jump and crouch buttons move player up and down a ladder trigger if they aren't holding a forward or backward move button already.
    • Added Zombie NPC prefab with animations, sound, and ragdoll.
    • targetPlayer var of Ai.js will now determine if NPC should ignore player.
    • Made the raycast length for item pickups scale with the playerHeightMod amount.
    • reachDistance var of DragRigidbody.cs is now proportionately scaled by playerHeightMod amount in FPSRigidBodyWalker.cs
    • The attack range of NPCs will now be reduced by the crouchRangeMod amount of AI.js when player is crouching.
    • The useAxisInput var of FPSPlayer.cs will now allow the player to use Unity’s built in horizontal and vertical axes for movement (for joystick input).
    • Changed the shell ejection method to use Shell Prefab RB and Shell Prefab Mesh object references of WeaponBehavior.cs to render physics and interpolated mesh separately for compatibility with greater ranges of fixed timestep and framerate speeds.
    • By default, the Q button now enters slow motion/bullet time mode.
    • The useViewClimb, viewClimbup, viewClimbSide, and viewClimbRight vars of WeaponBehavior.cs can now be used to create non-recovering view recoil when firing.
    • The useRecoilIncrease, shotsBeforeRecoil, viewKickIncrease, and aimDirRecoilIncrease vars of WeaponBehavior.cs can now be used to control sustained fire recoil for rapid firing weapons.
    • Added lowerGunForClimb var to FPSRigidBodyWalker.cs to allow lowering weapon when climbing ladders or ledges.
    • Added playClimbingAudio var to Ladder.cs to selectively prevent climbing sounds from playing while climbing a surface.

    The preview dev build web player demo has also been updated to version 1.17 final, so you can try that out here:

    Preview 1.17 Webplayer Demo

    And here is a link to the updated docs


    We will keep you current on the review process for version 1.17. In the meantime, if you have any questions or feedback, please let us know.
     
    Last edited: Jul 19, 2013
  47. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    wow thats a huge update... more awesomeness :)

    edit: sorry silly me
     
    Last edited: Jul 19, 2013
  48. inglipX

    inglipX

    Joined:
    Aug 9, 2012
    Posts:
    30
    Hey Azuline this update is huge and awesome haha thank you.
    A great addition would be a variable to disable/enable the bullet time (in case we want to disable this feature)
    - fists as a melee weapon
    - a game saving and loading method. Save Position for next time the game starts up, etc.

    Thank you~!
     
  49. snowboardkid

    snowboardkid

    Joined:
    Jun 16, 2013
    Posts:
    17
    The demo doesn't work for me, it just shows a little box that says "download unity". It's probably a problem with my computer, but does anyone here know why this would be happening? I really want to try the update!
     
  50. NessimOnair

    NessimOnair

    Joined:
    Jul 19, 2013
    Posts:
    22
    I would like to put a 3D character with my movie is not how I do with this kit .. :/ Help how?