Controls:
WSAD - move;Space - sprint;
E - start interaction;
Q - stop interaction;
Right mouse button - aim;
Left mouse button - fire;
F - disarm;
1, 2, 3 alpha keys - arm weapon;
` (backtick) - use selected item;
G - drop weapon;
C - open interaction menu;
X - close interaction menu;
ESC - open main menu;
In car:
Space - jump;
F - float;
Middle mouse button - handbrake;
Description:
This package might be used as a template to create sandbox survival games, third person shooters, survival horrors, sandbox RPGs, life simulation games and even racing games (if you want to give your players ability to walk outside of vehicle and explore environment).This package contains:
1. Animations.
All animations and models are in FBX format (except for animations for car's doors) and if you need only animations, then your can use them in any version of Unity. All of them are retargetable to humanoid rigs.
1.1. Character-weapons interaction (pistol and rifle):
- holster/unholster;
- reloading;
- aiming;
- shooting.
1.2. Character-car interaction:
- get in/out the car;
- legacy animations for car doors (this one is in legacy ANIM format);
- steering.
1.3. Others:
- pick up objects:
- open door:
- drinking;
- eating;
- movement.
2. Scripts.
All scripts are in C#.
- basic character controller;
- character-weapon interaction (aiming, firing, picking up, dropping, holstering/unholstering, reloading);
- character-car interaction (getting in/out, steering);
- health system for character;
3. Models.
All models is very simple and meant to be replaced by your own art.
- basic character;
- basic pistol;
- basic rifle;
- basic car;
- basic items (rifle and pistol clips, bottle, backpack, shelving).
Set up character guide.
This guide will help you to set your own character, the same as in the DemoScene.- Create a new scene ("File > New Scene").
- Delete gameObject "Main Camera".
- Create a floor for your character ("GameObject > 3D Object > Plane" or place your own environment in scene).
- In the Project Window go to "Irish cream Interactive > Common > Prefabs" and find "Character Template" prefab.
Drag & drop to the floor "Character Template" prefab. - Drag & drop to Hierarchy view "EventSystem" prefab witch located at "Assets > IC Interactive > Сommon > Prefabs";
- Drag & drop you character model to "Character Template" gameObject in Hierarchy view.
Note, your character should have correct Humanoid rig and should have "Animator" component after you place it in the scene. - Parent "Character template > *ParentThisTo_..." gameObjects to corresponding transforms (root, left hand, head, right hand and upper spine of your character's model).
- In the Project Window go to "Irish cream Interactive > Common > AnimatorControllers" and find "Human" animator controller.
Assign animator controller "Human" to your character. - In the Project Window go to "Irish cream Interactive > Common > Scripts > Character".
Assign scripts "AnimatorEvents", "AnimatorMovement", "IKController" to your character gameObject. - In the Hierarchy window go to "Character Template > Physics", find script "Character".
Drag & drop your character gameObject to variable "Animator" of script "Character". - In the Hierarchy window go to "Character Template > Physics".
Remove component "Skill". - In the Project Window go to "Irish cream Interactive > Character-firearm Animations > Scripts".
Find scripts "SkillFirearms", "FirearmAssigner".
Assign scripts "SkillFirearms", "FirearmAssigner" to "Character Template > Physics". - In the Project Window go to "Irish cream Interactive > Character-firearm Animations > Prefabs".
Find "Pistol", "Rifle" prefabs.
Drag & drop to the floor "Pistol", "Rifle" prefabs. - Go to script "FirearmAssigner".
Drag & drop "Pistol" to variable Pistol.
Drag & drop "Rifle" to variable Rifle. - Enter play mode.
!!!WARINIG!!! DO NOT EXIT PLAY MODE before you copy "Character Template" gameObject!!! - Go to "Character template > Physics".
Find script "Input Manager".
Set variable "Debug Aim On" of script "Input Manager" to true. Now you don't need to hold right mouse button to aim, just press. - Go to "*ParentThisTo_UpperSpine > FirearmsPositions > Rifle > Rifle Spine Slot > Rifle".
In script "Firearm" set variable "Debug Aim" to true. - In Game window press "Play" button.
- Press key "1" on alpha keybord to unholster rifle.
- Press right mouse button to aim.
Do not shoot yet! - Enable "*ParentThisTo_UpperSpine > FirearmsPositions > Rifle > Rifle aim > RifleModel".
- Enable "*ParentThisTo_UpperSpine > FirearmsPositions > Rifle > Rifle Spine Slot > RifleModel".
- Edit position of transform:
"*ParentThisTo_UpperSpine > FirearmsPositions > Rifle > Rifle aim".
Edit position and rotation of transforms:
"*ParentThisTo_UpperSpine > FirearmsPositions > Rifle > Rifle aim > RightHand".
"*ParentThisTo_UpperSpine > FirearmsPositions > Rifle > Rifle aim > LeftHand".
"*ParentThisTo_UpperSpine > FirearmsPositions > Rifle > Rifle Spine Slot".
"*ParentThisTo_RightHand > Rifle Hand Slot".
"*ParentThisTo_LeftHand > RifleClip".
Copy "Character Template" gameObject (right click on it in Hierarchy view > Copy). - Exit play mode.
- Paste "Character Template" gameObject.
- Copy and paste transform component from every edited transforms of copy to your original character (right click on component > Copy Component, right click on other component > Paste Component Values).
- Drag & drop "Character Template" to your prefab folder to make a prefab.
- Save scene.
- Do the same for pistol positions if needed.
Set up firearm guide.
- Open scene from "Set up character guide".
- Drag & drop your firearm model to gameObject "Rifle".
- Edit transforms of your firearm model, if needed.
- Disable gameObject "Rifle > Model".
- Select gameObject "Rifle".
In script "Firearm" set variables:
Model Name - your firearm name.
Min/Max Rifle Rotation/Translation - recoil in degrees and meters;
Available Fire Modes.
Fire Rate RPM - in rounds per minute.
Sounds for shoot, reload and empty.
Muzzle Velocity - in meters per second.
Rounds Count - how much rounds in firearm at start.
Round Capacity - magazine capacity of the firearm. - Rename gameObject "Rifle" after your firearm name.
- Drag & drop your firearm gameObject to your prefabs folder to make prefab.
- Go to "*ParentThisTo_UpperSpine > FirearmsPositions"
Duplicate "Rifle" gameObject
Name duplicate after your firearm name. - Go to "*ParentThisTo_RightHand"
Duplicate "Rifle Hand Slot" gameObject
Name duplicate after your firearm name. - Place your magazine model in "*ParentThisTo_LeftHand" gameObject.
- Go to "Character template > Physics".
Find script "SkillFirearmsVariables".
Go to variable "Weapons", change size to add element for your firearm.
In your element of variable "Weapons" assign variables: Name - your firearm name.
Aim - "*ParentThisTo_UpperSpine > FirearmsPositions > (your firearm name) > Rifle aim".
Left Hand Aim - "*ParentThisTo_UpperSpine > FirearmsPositions > (your firearm name) > Rifle aim > LeftHand".
Right Hand Aim - "*ParentThisTo_UpperSpine > FirearmsPositions > (your firearm name) > Rifle aim > RightHand".
Left Hand Armed - "*ParentThisTo_RightHand > (your firearm name) > LeftRifleArmed".
From Rifle To Cam Target - "*ParentThisTo_UpperSpine > FirearmsPositions > (your firearm name) > fromRifleToCamTarget".
Slot Spine - "*ParentThisTo_UpperSpine > FirearmsPositions > (your firearm name) > Rifle Spine Slot".
Slot Hand - "*ParentThisTo_RightHand > (your firearm name)".
Magazine In Hand - "*ParentThisTo_LeftHand > (your magazine model)"
Magazines Count - how much magazines at start.
Slot Index - 0 - two handed wielding; 1 - one handed wielding. - Go to "Character template > Physics".
In script "Firearm Assigner" change size of variable "Firearms" to add new element.
This adds new category of firearms.
Name new category, for example "Rifles". - Drag & drop your firearm gameObject to variable "Sub Firearms".
- Now you can assign your firearm to character from menu in play mode. Press "B".
You also can assign your firearm from script "Firearm Assigner". Just call function "AssignFirearm(int categoryIndex, int FAIndex)". - Edit transforms as described in Set up character guide after entering play mode if needed.
Set up vehicle guide.
Your car model should have separate door and wheel models.Place your own model in vehicle gameObject "Vehicle > Car > Model". Edit transform if needed.
Copy "Animation" component from "Vehicle > Car > Model > DoorFrontLeft" to you own door (right click on component > copy component on my door and then right click on transform component > paste component as new on your door), and select gameObject "Vehicle > InteractionRig > DriverSit > InteractionTrigger" and in "InteractiveObject" script assign your door to variable "Front Left Door".
You also need to assign your "Wheel meshes" to script "CarController" that attached to gameObject "Car".
You might need to edit transforms of gameObjects in "Vehicle > Car > Wheels" and "Vehicle > InteractionRig > DriverSit > SitStart".
Turn off every visual parts of old car.
Warning: include(footer.html): Failed to open stream: No such file or directory in C:\xampp\htdocs\packages\bist-is-sandbox-template.php on line 193
Warning: include(): Failed opening 'footer.html' for inclusion (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\packages\bist-is-sandbox-template.php on line 193