private BodyInfo GetBodyInfo() { var sizeTransform = Components.GetComponent <ISizeTransform>().AssertNotNull(); var positionTransform = Components.GetComponent <IPositionTransform>().AssertNotNull(); var physicsCollisionNotifier = Components.GetComponent <IPhysicsCollisionNotifier>().AssertNotNull(); var fixtureDefinition = PhysicsUtils.CreateFixtureDefinition(sizeTransform.Size, layerMask, physicsCollisionNotifier); var bodyDefinitionWrapper = PhysicsUtils.CreateBodyDefinitionWrapper(fixtureDefinition, positionTransform.Position, this); bodyDefinitionWrapper.BodyDefiniton.AllowSleep = allowSleep; return(new BodyInfo(Id, bodyDefinitionWrapper)); }