I've started to learn DOTS some day ago, and decided to create a simple project. When I added some simple physics to the game I faced the problem. I added one object on the scene and another instantiated from a resource as a prefab (prefab contains physics shape and physics body), but they didn't collide and just go through. When I tried to place both objects in the scene they work perfectly. Then I tried to instantiate them both and got nothing, I mean they didn't collide... Maybe I miss something? I couldn't find any explanation for this in the Unity Physics doc.
Tried in Unity 2021.1 and 2020.3
Box on the scene configuration:
Spawn object code:
var world = World.DefaultGameObjectInjectionWorld;
var entityManager = world.EntityManager;
var settings = GameObjectConversionSettings.FromWorld(world, null);
_entityPrefab = GameObjectConversionUtility.ConvertGameObjectHierarchy(_playerPrefab, settings);
Entity player = entityManager.Instantiate(_entityPrefab);
entityManager.AddComponent<PlayerMovementComponent>(player);
entityManager.SetComponentData(player, new PlayerMovementComponent()
{
Speed = 10f
});
entityManager.SetComponentData(player, new Translation()
{
Value = new float3(.5f,0f,.5f)
});

