Make a rect at center of sprite

How can i put the center of a rectangle on the center of a sprite? Either that or a way to inflate a rect starting from the center. Any way to do this?

It sounds like you should probably have some other sort of object that has a function that returns this calculated Rectangle, or you could make a new type called like “CenteredRectangle” or some such that could internally work with an XNA Rectangle and then store/retrieve its X/Y through properties that apply half the width/height first to get/set the center offset or some such.

1 Like