Creating Bow And Arrow Mechanics - Part 1

Jul 11, 2024

Creating Bow And Arrow Mechanics

Introduction

  • Learn to create Bow and Arrow mechanics from scratch.
  • Covers beginner and intermediate levels.
  • Focus on blending animations, aiming, dynamic widgets, physics collisions, trajectory, VFX, sounds, etc.
  • Full project files available on Patreon.

Part 1: Setting Up The Player

Initial Setup

  • Using third-person template.
  • Steps to equip the bow:
    1. Set up player animations and locomotion blend space.
    2. Create an aim camera.

Character Setup

  • Copy third-person character blueprint, create BP_Player and move it to the player folder.
  • Set BP_Player as the default Pawn in third-person game mode.
  • Changed mesh color to make the player character unique.

Controls

  • Focus on character movement component settings:
    • Use Controller Desired Rotation for precise camera control.
    • Orient Rotation to Movement for following the camera direction.
  • Custom settings for aiming: change these articulations dynamically when aiming.

Animations

  • Create a new Animation Blueprint (ABP_Player) based on existing mannequin animation.
  • Setting up blend space for animation blending based on direction and speed.
  • New blend space for bow mechanics: defines animation states for idle, moving forward, left, right, and backward.
  • Using calculated direction to update animations.

Mesh and Skeletal Attachment

  • Attach bow to the player using a socket on left hand.
  • Skeletal mesh for bow created and animated in Blender.
  • Preview bow placement using animation blueprint, then attach in blueprint class.
  • Moves spawning and attachment of the bow into an actor component (AC_BowMechanics).

Actor Component for Bow Mechanics

  • AC_BowMechanics handles bow-related functionalities modularly:
    • Equip bow with configurable class and socket name.
    • Reference character mesh and setup variables.

Aiming Mechanics

  • Input actions set up for aiming (IA_BowAim with hold and release triggers).
  • Custom events for handling aim begin and end states.
  • Changes to character movement component and camera during aim mode:
    • Adjust Field of View (FOV) and camera boom offsets for aiming.
    • Smooth transition using timeline.
    • Modify rotation rate for responsive aiming.

Conclusion

  • Recap: character, controls, camera setups for bow aim mechanics.
  • Next steps: focus on bow mechanics—aim animations, arrow shooting, etc.
  • Project files available on Patreon.
  • Encourages users to subscribe and support via Patreon.