vrfpskit-docs
  • User Manual
    • Getting Started
    • Setup Troubleshooting
    • Damageable Component
    • XRHeldInputAction
  • Weapons
    • Included Weapons
      • Glock 17
      • HK-416 (AR-15)
      • AKS-74U
      • Winchester Model 1897
      • Mosin Nagant
      • HK Mp5
      • M67 Grenade
    • Firearm Components
      • Firearm
      • MagazineInteractor
      • CyclingFirearmAction
      • Input Components
        • FirearmTrigger
      • Physical Input Components
        • PhysicalUnlockActionTrigger
        • PhysicalFireSelectInteractor
        • MagazineCollisionDetacher
    • Creating Firearms
      • Animating the Firearm
  • Multiplayer
    • Authority Handling
    • Multiplayer Troubleshooting
    • Mirror Networking Docs
  • XR Interaction Toolkit Docs
  • Support Discord
Powered by GitBook
On this page
  • Animating Action Movement
  • Animating Firearm Movement
  • Animating Magazine Movement
  1. Weapons
  2. Creating Firearms

Animating the Firearm

Last updated 1 year ago

The FirearmAnimator Component requires that the following parameters are present on the animator.

The easiest way to ensure this is by starting of by cloning a previous animator. This way you will also have the layer structure already there. Also make sure that the new Animator is using the newly cloned animations and not the old ones from the weapon you cloned.

Animating Action Movement

All the visual action movement is done through the "Bolt Movement" animation, which uses the current action position as it's time, where 0:00 is completely closed, and 1:00 is completely open. You will want to animate your new weapon accordingly.

Animating Firearm Movement

Anytime you are animating firearm movement (like recoil), make sure to move the gameObject called "model", and not the model it self. This will ensure that things like magazines & attachments also move!

Animating Magazine Movement

When animating magazine movement, you will want to animate the {Your_Weapon_Prefab}/model/magazineRenderPoint object. Animating the "Magazine Socket" will do nothing.