public BodyUpdateData(IBodyUpdate physicsUpdate, int bodieID) { PhysicsUpdate = physicsUpdate; BodieID = bodieID; TargetPosition = Vector3.zero; TargetRotation = Quaternion.identity; IsAddedToSimulation = false; }
public BodyUpdateData(IBodyUpdate physicsUpdate, int bodieID, Vector3 position, Quaternion rotation) { PhysicsUpdate = physicsUpdate; BodieID = bodieID; TargetPosition = position; TargetRotation = rotation; IsAddedToSimulation = false; }
public void SubscribePhysicsUpdate(IBodyUpdate physicsUpdate, int bodieID) { var physicUpdate = new BodyUpdateData(physicsUpdate, bodieID); lock (GetBodiesData()) { GetBodiesData().Add(physicUpdate); } }