- const Point &pos = track.get_position();
- Point minp;
- Point maxp;
- type.get_bounds(0, minp, maxp);
- float rot = track.get_rotation();
- float c = cos(rot);
- float s = sin(rot);
-
- Point center((minp.x+maxp.x)/2, (minp.y+maxp.y)/2, 0);
- return Point(pos.x+c*center.x-s*center.y, pos.y+s*center.x+c*center.y, pos.z+0.02);
+ Vector minp;
+ Vector maxp;
+ type.get_bounds(Angle::zero(), minp, maxp);
+
+ return track.get_position()+rotated_vector((minp+maxp)/2.0f, track.get_rotation())+Vector(0, 0, 0.02);