Transform Fast Projectile
Moves a projectile forward each physics step and reliably detects collisions without requiring a Rigidbody.
Designed for fast-moving objects like lasers, bullets, plasma bolts, spells, missiles, or anything that should hit the first object in its path without tunneling through.
The action sweeps between frames using a thin or thick collision check (raycast or spherecast) to ensure the projectile never passes through objects, even at very high speeds.
Parameters
| Parameter | Description |
|---|---|
| Transform | The projectile Transform that will be moved forward each frame. |
| Speed | How fast the projectile travels (units per second). |
| Direction | The direction the projectile moves. If left empty, uses the Transform’s forward direction. |
| Space Mode | Whether the Direction is interpreted in World or Local space. |
| Collision Radius | Set to 0 for a thin raycast, or use a small radius to make the projectile more reliable (recommended). |
| Layer Mask | Which layers the projectile can collide with. |
| Trigger Interaction | Whether triggers should be detected by the sweep. |
| Hit Event | Event sent when the projectile hits something. |
| Hit | (Optional) Stores true/false if a hit occurred. |
| Hit Object | (Optional) Stores the GameObject that was hit. |
| Hit Info | (Optional) Stores a full RaycastHit with details (point, normal, distance, etc.). |
Details
This action is ideal for projectiles that move in a straight line and should hit something immediately and accurately.
Key behaviors:
- Moves the projectile every physics step
- Checks the space between frames to ensure nothing is skipped
(prevents tunneling through thin or fast-moving objects) - Supports ray-style hits (radius = 0) or bullet-style hits (sphere radius > 0)
- Sends a hit event and stops running when something is struck
- Works perfectly with pooled projectiles (no Rigidbody required)
When to use it
Use this action when you want:
- Reliable laser-style projectiles
- Fast-moving bullets that never miss due to physics tunneling
- Projectiles that should stop at the first object they hit
- Simple forward-moving effects with optional impact VFX
Performance
- Update Mode: Runs in FixedUpdate, in sync with Unity physics
- Performance Impact: Very low - performs one raycast or spherecast per frame
- No Rigidbody required → avoids physics overhead entirely
Spherecasts with very large radii cost more than raycasts, so keep the radius small unless needed.
Debugging
Inspector Information:
- Optional debug line shows the forward sweep each frame
- Hit variables will populate only when a collision occurs
Common Issues:
- If the projectile appears to pass through objects, increase Collision Radius
- Ensure the hit layers include the objects you're testing against
- If using Local direction, confirm the projectile’s rotation is correct at spawn
- Extremely large Fixed Timestep values can reduce accuracy (default 0.02 is ideal)
Examples
Typical Gameplay Uses
- Space shooters
- Laser bolts fire quickly and stop instantly when striking ships
- First-person weapons
- Fast projectiles that behave like hit-scan but with visible travel
- Magic spells
- Fireballs or bolts that fly straight and impact reliably
- Sci-fi projectiles
- Plasma rounds, energy beams, and other VFX-based shots
Best Practices
- Use Collision Radius > 0 for small or fast projectiles
- Use Hit Object to apply damage or spawn impact effects
- Use Hit Info for advanced reactions (impact direction, decals, sparks)
- Combine with a visual component (quad, sprite, mesh, ribbon) for the projectile body
- Pool projectiles for best performance in high-fire-rate weapons
Transform Fast Projectile is a lightweight and reliable way to handle fast-moving hits without the complexity of full physics simulation.