![realistic fps prefab compatible realistic fps prefab compatible](https://docs.unity3d.com/uploads/Main/GameObjectStaticDropDownMenu1.png)
![realistic fps prefab compatible realistic fps prefab compatible](https://assetstorev1-prd-cdn.unity3d.com/package-screenshot/a928ed28-4494-4d08-94c9-0e15b9f59485_scaled.jpg)
#Realistic fps prefab compatible code#
Added code to prevent null reference errors for several assets if missing and added a console error in AI.cs if navmesh has not been baked for a scene, or NPC can't find navmesh.Increased grounded check capsule cast radius to prevent situations where player became stuck in ungrounded state when confined in a space just narrow enough to fit player collider after becoming ungrounded.Added code to the Update() loop in WeaponBehavior.cs and removed all otherfx.pitch statements in WeaponBehavior.cs to allow reloading sound effect to dynamically scale up or down in pitch to match game speed.Changed shell ejection position handling and added shellEjectPositionZoom var to WeaponBehavior.cs for proper shell ejection using the dual camera player prefab with upscaled weapons.Removed WorldRecenter.cs script from player prefabs and moved removePrefabRoot var to FPSPlayer.cs, since WorldRecenter is not needed anymore for huge maps.This prefab can be placed in scenes with dimensions up to 12000X12000 before spatial jitter is apparent on weapon models, though shadows from world geometry are not cast on the weapon models while using this prefab. Improved 2 camera player prefab by upscaling weapons to prevent spatial jitter on larger terrains.Increased grounded detection height slightly to prevent sliding over uneven terrain at higher speeds.Added reachDistance var to FPSPlayer.cs to allow custom distance for item pickups and activations.Added removeTime var to WeaponPickup.cs to allow weapon pickups to be destroyed after a time.Cached most GetComponent calls for Animation and RigidBody components.Added Mecanim support for NPC animations.Replaced Autowaypoint.cs with WaypointGroup.cs, to optimize NPC patrolling and to lay foundation for more future NPC behaviors.NPC registry, spawner, and wave manager scripts created to track, and dynamically add NPCs to scenes.Smoother and more accurate rotation allows them to attack strafing targets much better now. Improved NPC horizontal tracking of targets.Moved zoomSensitivity var to WeaponBehavior.cs to allow for tuning of zoomed mouse sensitivity per weapon.Updated WaterZone.cs and WaterZone prefab to use new Unity 5 water shader.
![realistic fps prefab compatible realistic fps prefab compatible](https://i.ytimg.com/vi/zCjkwZFY_ls/maxresdefault.jpg)
Udated game assets to use Unity 5's new standard shader.Improved a few weapon textures and models.New, experimental tree models using Unity 5's LOD system, TODO: fade shaders between LOD states.New player prefab called "FPS Main 1 Camera" can be used for 1 camera setups to allow shadows from level geometry to be casted on weapon models and for better compatibility with image effects and shaders.Only one instance of this utility script is needed per scene. Created static function to replace old PlaćlipAtPoint code.silentShots var of WeaponBehavior.cs can be used to make NPCs not hear certain weapons firing.Added legs in first person view and wrote a VisibleBody.cs script.Fixed jump button not moving player up ladders.Fixed canZoom var of WeaponBehavior.cs to allow /prevent zooming for a weapon.Added condition checks to WeaponBehavior.cs to prevent shells from ejecting from weapons by selecting "none" for Shell Prefab RB and Shell Prefab Mesh references in the inspector.Here's a list of the improvements for version 1.22: Thanks for your patience, as it has been a lot longer than expected since the last update, but development will be picking up speed again. The other player prefab uses one camera, is more compatible with shaders and image effects, and has shadows from world geometry cast on weapon models, but works better in scenes that are 1200x1200 units. One of the main changes, was the removal of the WorldRecenter.cs script from the player prefab, and the addition of a second, optional player prefab, which uses 2 cameras and upscaled weapons to significantly reduce spatial jitter of weapon models in huge 12000x12000 unit scenes. The release date was pushed back a bit, because in the process of checking the scripts, some bugs fixes and improvements were made that took a week or so. Click to expand.Hi USTGames, version 1.22 is finished.