[override]protected void recalcM(){ m = Matrix.CreateTranslation(new Vector3(-_org.X, -_org.Y, 0))* Matrix.CreateRotationZ((float)_deg)* Matrix.CreateScale((float)_scale) * Matrix.CreateTranslation(_pos.X, _pos.Y, 0); Vector2 p1 = Vector2.Transform(pos, m), p2 = Vector2.Transform(new Vector2(size.X, 0) + pos, m), p3 = Vector2.Transform(new Vector2(size.X, size.Y) + pos, m), p4 = Vector2.Transform(new Vector2(0, size.Y) + pos, m); int minx, miny, maxx, maxy; { // min|max suche minx = Math.Min(Math.Min((int)p1.X, (int)p2.X), Math.Min((int)p3.X, (int)p4.X)); maxx = Math.Max(Math.Max((int)p1.X, (int)p2.X), Math.Max((int)p3.X, (int)p4.X)); miny = Math.Min(Math.Min((int)p1.Y, (int)p2.Y), Math.Min((int)p3.Y, (int)p4.Y)); maxy = Math.Max(Math.Max((int)p1.Y, (int)p2.Y), Math.Max((int)p3.Y, (int)p4.Y)); } rec = new Rectangle(minx, miny, maxx - minx, maxy - miny); //Cbox if (!rself) colr = Math.Max(Math.Max(Vector2.Distance(org, p1), Vector2.Distance(org, p2)), Math.Max(Vector2.Distance(org, p3), Vector2.Distance(org, p4))); //Collisionskreis berechnen }