Best examples for the most basic DOTS Physics?

Hey everyone,

I admit I kinda got lost a little bit.

I want to learn how to use Physics for ECS but i can’t find any new examples (tutorials etc…) and the Docs are not so helpful (for me at least).

I know that there is a new 1.0 Physics but i cant find too much information and mostly examples with it, only a few and with the old one (If there are any massive changes to the new one).

My request is if someone can kindly direct me to the best place (examples would be great) which I can learn the basics of DOTS Physics such as: Collision detection between 2 entities, adding collider on entity, RigidBody on entity etc…

I will be grateful.
Thanks!

And then look into PhysicsSamples

That looks great, thanks.
The only thing I can’t find there are the scripts that belong to the collision detection in the sample scenes, I only found the scenes.

I almost ran into the same issue when looking at this. I found they didn’t separate the component from the author (Baking) from the system in a lot of these files so it’s extremely grouped up. I wish they wouldn’t do that, ECS can be confusing as is and grouping those all into one script file is not helping.

I’m still not sure what is running against what since all of the systems are running and it’s harder to pinpoint what is running what. Having what scripts are running against what examples would really help. I found one system that is running although I’m not for sure what it’s tied to yet, just started digging to see what I could find. The name of the system I went looking for was Random Motion System. I found it under Assets/Common/Scripts/RandomMotionAuthoring. What’s confusing about this to me is that Authoring scripts are usually attached to an Entity, so far I’m not sure what Entity this is attached to, if any at all. The file has what I talked about above, the component, the author (Baking) and the system. I was initially looking for a system script. You may have to dig through the authoring scripts to see if it’s there if they followed that pattern in the rest of these scripts.

I made a tutorial for beggineer on fast bootstrapping on DOT Physics

There’s a lot of video covering the basic usage of dots physics, but still exists a gap for beginner to use it with the same habbit in OOD ( Object Oriented Development), such as OnCollisionEnter/Stay/Exit, Set Rigidbody IsKinematic or so on…

I am just a newbee that working on dots in recent month, thinking this video will help someone like me.

This video demonstrate a general approach on DOTS Physics for beginners by utilizing Unity ECS Samples.

  1. Capture Collision/Trigger Events in a per-entity manner in DOTS
  2. Disable/Enable Rigidbody and Collider in DOTS Additional Note provided :
  3. What happens when “Is Kinematic” is toggle on/off?
  4. How to “modify” physics collider/ rigidbody component data ?