Game Creator
  • Welcome to Game Creator!
  • Quickstart
    • Get Started
    • Setup
    • Tutorials
  • Game Creator
    • Game Creator
      • Actions
      • Conditions
      • Triggers
      • Hotspots
      • Characters
        • Player
        • Markers
        • Gestures
        • States
        • Advanced
          • IK in custom Animations
      • Camera
        • Camera Motors
      • Variables
        • Global Variables
        • Local Variables
        • List Variables
    • Systems
      • Localization
      • Event System
      • Timeline
      • UI
      • Module Manager
      • Game Creator Toolbar
      • Pool System
      • Game Creator API
        • Custom Actions
        • Custom Conditions
        • Custom Triggers
        • Custom Hooks
        • Custom Save & Load
        • Variables Access
        • Custom Module
  • Dialogue
    • Dialogue
      • Anatomy
      • Actors
      • Dialogue UI
      • API
  • Inventory
    • Inventory
      • Inventory Window
        • Catalogue
        • Recipes
        • Types
        • Settings
      • Merchants
      • Containers
      • Loot Tables
      • Equip Items
      • Actions
      • Conditions
      • Custom Inventory UI
  • Quests
    • Quests
      • Quests Overview
      • Create Quests
      • Quests UI
        • Custom UI
  • Stats
    • Stats
      • Stats Overview
        • Stat
        • Attributes
        • Status Effects
        • Formulas
        • Stat Modifiers
      • Stats UI
      • Common Use Cases
        • Simple Health Bar
        • Regenerative Mana
        • Poison Status Effect
        • Levels and XP
        • Strength and Armor
        • Lockpicking
  • Behavior
    • Behavior
      • Behavior Graph
        • Nodes
        • Blackboard
      • Perception
  • Shooter
    • Shooter
      • Weapons
      • Ammunition
      • Interaction
      • Examples
        • Example 1 - Get Started
        • Example 2 - Pick Weapons
        • Example 3 - Top Down
        • Example 4 - Side Scroll
        • Example 5 - First Person
        • Example 6 - Combat
      • Advanced
        • Custom Crosshairs
        • Shooter API
  • Melee
    • Melee
      • Weapons
        • Blade Component
      • Shields
      • Melee Clips
      • Combat
  • Traversal
    • Traversal
      • Obstacles
      • Climbables
      • Built-in Elements
  • Annex
    • Roadmap
    • FAQ
Powered by GitBook
On this page
  • Blade Edge
  • Capture Hits
  • Blade Trail

Was this helpful?

  1. Melee
  2. Melee
  3. Weapons

Blade Component

Sling! Slash! And Thusck! - Detect all these and apply damage

PreviousWeaponsNextShields

Last updated 4 years ago

Was this helpful?

The Blade Component is a Unity component that must be attached to a prefab game object used as the scene representation of a weapon. It serves two purposes:

On one hand, it allows to display particle and sound effects when clashing with other scene objects, as well as show a trail during the activation phase of an attack.

On the other hand, it is also responsible for determining and collecting the enemies hit by the weapon during an activation phase.

Debug Mode allows to display internal information about the sword slash. This is useful if you don't have a weapon trail or it's barely perceptible and you want to know why an attack is not hitting an enemy.

Blade Edge

Blade Edge positions allow to define a segment that will be used for both the trail of the weapon and detecting hits (when the weapon is required to) if the Capture Hits dropdown is set to segment.

These Blade Edge Point A and Point B fields should go along the whole blade (in case of a Sword) or along the head (in case of a Hammer or Axe).

Capture Hits

The Capture Hits dropdown allows to select how you want to detect hits using this weapon. As for now you can choose between two options:

  • Segment: Detects hits by Raycasting along the blade of the weapon (determined by Point A and Point B). However, in order to avoid ghosting through objects due to a fast slash, it also checks inter-frame objects. This is determined by the Segment Resolution: The lower the value, the more precise. However, it will also be more costly. Something around 0.5 should fit most cases.

  • Sphere: Detects hits by casting a sphere at a specific position and processes any objects caught inside. This is the most performant capture mode, and should be used if you're targeting mobile devices or WebGL platforms.

Blade Trail

The Blade Trail is a custom made trail effect used during the Activation phase of an attack. Because most attacks are too fast to be perceived by the human eye, it's a common practice to draw a trail that represents the blur of the moving weapon at a high speed.

This effect can be customized to use a custom Material as well as define its Duration and how smooth the trail will look using the Granularity field.

The Trail will always use the segment defined by Point A and Point B from the Blade Edge section.

(Blade Component)
(Debug information about the trail and hit casts)
(Point A and Point B define a segment that goes along the blade)