How to Get Started with DOTS Physics in Unity ECS
Unity Entities 0.50
Last Updated on: 6/24/2022

This will take you about 20 minutes in prep time if you don't have Unity set-up, and 30 minutes in coding and debug time.
Stop struggling with the limited documentation. Follow this step-by-step tutorial: "How to Get Started with DOTS Physics in Unity ECS."
Full workflows and code to shoot bullets to destroy entity prefabs powered by DOTS Physics

This gitbook takes you through step-by-step full workflows and code to shoot bullets to destroy entity prefabs powered by DOTS Physics. Once you've coded along and fully finished the "How To Get Started with DOTS Physics" tutorial, you will be able to shoot bullets to destroy entity prefabs powered by DOTS Physics.
High-Level steps to Get Started with DOTS Physics:
Use Physics Bodies and adjusting Physics Velocity programmatically
Change stateless triggers to buffer of stateful triggers
Act on triggers to change materials and destroy entities
FAQ
What is a good approach when implementing DOTS Physics in Unity ECS?
A good way to approach implementing DOTS Physics is by checking out the DOTS Physics samples and finding an example similar to what you're looking to implement, and then copying, pasting, and modifying to your needs. The current Physics documentation is difficult and trying to build these functionalities from scratch is a Sisyphean task. It's much simpler to grab code from Unity's samples since there's a lot of "boilerplate" for a majority of the Physics interactions.
What are the main run-time components of DOTS Physics in Unity ECS?
The main components are: PhysicsCollider, PhysicsVelocity, PhysicsMass, PhysicsDamping, PhysicsGravityFactor, PhysicsCustomTags. These components are read from to BuildPhysicsWorld then written to in ExportPhysicsWorld.
What are Physics Category Names in Unity ECS?
Physics Category Names are how you can define what objects collide with each other and whether or not they raise events.
Haven’t begun learning Unity DOTS yet, and need to start at the very beginning?
If you haven't yet dipped your toes into learning Unity's new multithreaded Data-Oriented Technology Stack (DOTS), now is the time. You can start at the very beginning with Moetsi’s tutorial, which culminates in your very own deployable sample project. You’ll be guided by full workflows, code-alongs, videos, and GIFs along the way.
Whether you have questions about Unity's multithreaded Data-Oriented Technology Stack (DOTS), or about the RaaS API, or even just general questions about data-intensive pipelines for spatial computing applications, come join our Discord! We maintain a friendly channel, and we're always quick to respond.