wave5-physics-velocity-force-application

Apply forces and impulses to Unity Physics dynamic bodies via PhysicsVelocity updates.

6|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/dyCuong03/unity-agent-team --skill wave5-physics-velocity-force-application
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wave5-physics-velocity-force-application
Source: https://github.com/dyCuong03/unity-agent-team/tree/main/.claude/skills/unity-dots/wave5-physics-velocity-force-application
Command: npx skills add https://github.com/dyCuong03/unity-agent-team --skill wave5-physics-velocity-force-application

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you apply forces and impulses in Unity DOTS Physics correctly by updating PhysicsVelocity at the right time relative to the physics simulation.

Core Features & Use Cases

  • Fixed-step force application: Write PhysicsVelocity from systems in FixedStepSimulationSystemGroup before PhysicsSystemGroup to keep results stable.
  • Dynamic-body safe updates: Prevent NaNs and invalid motion by guarding static/infinite-mass bodies using PhysicsMass.InverseMass.
  • Impulse and continuous behaviors: Use the pattern for gravity-well style continuous forces, wind/magnetic attraction, and one-shot initial velocity assignment after spawning.

Quick Start

Tell the AI to write a Burst ISystem scheduled in FixedStepSimulationSystemGroup that updates PhysicsVelocity before PhysicsSystemGroup to apply a continuous directional force while guarding against PhysicsMass.InverseMass == 0.

Frequently Asked Questions about wave5-physics-velocity-force-application

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

FAQPage Schema
How do I apply forces to PhysicsVelocity in Unity DOTS without causing simulation instability?

To apply forces to PhysicsVelocity in Unity DOTS without instability, write updates from a Burst ISystem scheduled in FixedStepSimulationSystemGroup and ensure it updates before PhysicsSystemGroup. This fixed-step ordering keeps your dynamic body simulation stable.

Why does applying a force to a static body in Unity DOTS Physics result in NaN errors?

Applying a force to a static body in Unity DOTS Physics results in NaN errors because infinite-mass bodies have a zero inverse mass. You must guard against PhysicsMass.InverseMass == 0 to prevent NaN physics states and invalid motion.

How do I apply an impulse or one-shot initial velocity to a dynamic rigid body in Unity DOTS?

To apply an impulse or one-shot initial velocity to a dynamic rigid body in Unity DOTS, update PhysicsVelocity directly from a system in FixedStepSimulationSystemGroup. This pattern handles initial velocity assignment after spawning and impulse-like gameplay interactions.

Can I use Burst compilation with PhysicsVelocity updates for continuous force systems?

Yes, you can use Burst compilation with PhysicsVelocity updates for continuous force systems. You should write a Burst ISystem scheduled in FixedStepSimulationSystemGroup to apply continuous directional forces like gravity-wells, wind, or magnetic attraction efficiently.

Do I need to use fixedDeltaTime when applying continuous forces to Unity DOTS dynamic bodies?

Yes, you need to use fixedDeltaTime when applying continuous forces to Unity DOTS dynamic bodies. Correct use of fixedDeltaTime within the FixedStepSimulationSystemGroup ensures that your continuous force application and velocity integration remain mathematically accurate.

When should I update PhysicsVelocity relative to PhysicsSystemGroup for custom gravity or wind forces?

You should update PhysicsVelocity before PhysicsSystemGroup when applying custom gravity or wind forces. Using UpdateInGroup and UpdateBefore attributes provides the necessary ordering guarantees so the physics simulation processes your newly applied forces immediately.