Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archery Controller

A third / first person bow shooter prototype I built in Unity. The character can aim, draw the string over time and release to fire an arrow that flies, rotates along its trajectory and sticks into whatever it hits.

I'm keeping this here mostly as an archive. It's a snapshot of the gameplay scripts from the project, nothing more. If it's useful to someone reading, good.

Screenshots

Aiming down a street:

Aiming

Drawing the bow:

Drawing

What's inside

Everything lives under Assets/Scripts, split by responsibility:

Folder Script Job
Input InputReader Reads movement, sprint and aim input in one place
Player PlayerLocomotion Drives the Animator (movement, sprint, aim, draw, fire)
Player PlayerLook Mouse look with configurable pitch limits and optional orbit yaw
Camera CameraRig Switches between the first, second and third person cameras
Combat ArcheryController Aim, draw and fire state machine that ties input, animation and the bow together
Combat Bow Handles the string, nocking, equip / holster and spawning arrows
Combat Arrow Projectile that orients along its velocity and embeds on impact

The aim point is taken from a screen center raycast through the active camera, so it works the same across all three camera modes.

Controls

Action Input
Move WASD
Sprint Shift
Aim Right mouse button (hold to draw, release to fire)
Switch camera V, or 1 / 2 / 3

Notes

Built with Unity 2022.2.21f1, built in input manager, Mixamo rig for the character. Only the scripts and a couple of gameplay screenshots are committed here, not the full project (assets, scenes and prefabs are left out on purpose).

About

Unity archery controller system built with C#. Includes bow mechanics, arrow physics, aiming, shooting and player interaction systems. Only for archive my scripts here, not full project

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages