Skip to content

MuharremTozan/Agentic-Duel / .agent/skills/unity-interaction

unity-interaction

Verified

Generic raycast-based interaction system. Works for any game genre (RPG, Platformer, Simulation).

references/guide.md

View on GitHub
# Interaction System Guide

## Core Concept
This skill provides a **generic, raycast-based interaction system** that works for any game genre.

## Quick Start

### 1. Setup Interactable Object
```csharp
using Standard.Interaction;

public class Door : MonoBehaviour, IInteractable {
    public void Interact(IInteractor interactor) {
        Debug.Log("Door opened!");
        // Your door logic here
    }

    public void InteractAlternate(IInteractor interactor) {
        Debug.Log("Door locked!");
    }
}
```

### 2. Setup Player/AI
- Add `InteractionController` to your player
- Set `Interactable Layer` to match your objects
- Adjust `Interact Distance`

### 3. Layer Setup
1. Create a new Layer: "Interactable"
2. Assign it to all objects with `IInteractable`
3. Reference it in the controller

## Pro Tips
- **E Key**: Primary interaction
- **F Key**: Alternative interaction
- **Raycast Direction**: Uses `transform.forward` (works with both 2D and 3D)
- **Event Integration**: Add event firing in `SetSelectedTarget()` for UI feedback

## Use Cases
- Doors, chests, NPCs (RPG)
- Crafting stations, cooking (Simulation)
- Pickups, switches (Platformer)
- Any clickable object
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall