This example requires the Shooter Module for Game Creator 1 from Catsoft Works to be installed.This example has been configured with Basic IK but can easily be changed to use Final IK from RootMotion.
We have configured this example for both Adventure camera and First Person. The two Actions added to the Example Actions are to call Conditions (for Draw Weapon or Holster Weapon), and to Shoot. For drawing and preparing to Shoot, we need to Inactivate the IK, and set all the Colliders to Inactive. If colliders do not set the colliders to Inactive, the bullets will hit the Player colliders and the shooter will not work as expected. We also set the Aim to Muzzle forward.
The Holster Action will reverse the above. The Shoot Action simply calls the Player to Shoot, and this has been added to the Trigger on the Right Controller.
NOTE: You must Holster the Weapon before changing the Camera and associated Model, otherwise you will need to holster and draw again, as the attachment of the Weapon is not carried over to the next model. For a production game, you should add this to the Camera Change Action so you are not relying on your player to do this.
The Player has had the Player Shooter component added, and the Character has had the Character Shooter component added. We have also added a sphere collider, and a Trigger with On Receive Shot to the Character. The associated Action calls a Ragdoll on the Character.
This example does not cover two handed weapons nor the Bow and Arrow. These will come in a future update or tutorial.