pushback

Apply directional knockback and color flash to enemies in React Three Fiber.

31|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/verekia/r3f-gamedev --skill pushback
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pushback
Source: https://github.com/verekia/r3f-gamedev/tree/main/skills/pushback
Command: npx skills add https://github.com/verekia/r3f-gamedev --skill pushback

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enemies need immediate visual feedback and a clear knockback when damaged to communicate impact and maintain combat readability.

Core Features & Use Cases

  • Flash the enemy white on damage to signal hit.
  • Apply back-and-forth pushback along a damage direction to convey knockback.
  • Easy to integrate within a useFrame loop in React Three Fiber projects.

Quick Start

Trigger the pushback effect when an enemy receives damage by updating its pushback state and playing the flash animation.

Frequently Asked Questions about pushback

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add hit reaction and knockback to enemies in React Three Fiber?

Hit reaction and knockback in React Three Fiber require updating enemy pushback state with direction and progress inside a useFrame loop, toggling material color to flash white while applying back-and-forth motion along the damage direction.

What is the best way to show visual feedback when an enemy takes damage in r3f?

Visual feedback for enemy damage in r3f is achieved by toggling the enemy's material color to flash white while simultaneously applying a back-and-forth pushback motion, ensuring immediate impact clarity and combat readability.

Does this enemy pushback effect require external physics libraries to work?

No external physics libraries are required. The pushback effect is driven by a custom state tracking direction and progress, animated via a back-and-forth motion curve directly inside the React Three Fiber useFrame loop.

How do I trigger the knockback effect when an enemy receives damage?

Trigger the knockback effect by updating the enemy's pushback state with the damage direction and starting the progress timer, which initiates the back-and-forth motion and toggles the material color flash within your game loop.

Can I use a custom motion curve for the enemy pushback animation?

Yes, the pushback animation uses a back-and-forth motion curve defined by the pushback state's progress, which can be integrated and customized directly within your existing React Three Fiber useFrame update cycle.

Why does my enemy pushback animation lack combat readability?

Combat readability suffers if the pushback lacks immediate visual cues. Implementing a simultaneous material color flash alongside the directional knockback motion ensures damage impact is clearly communicated to the player.