Support Forum

Move shape center

I have been testing using the RVOController in a 2D RTS style game. I noticed that the units are avoided based on the radius of their shape, and what I would like is to move the center of this shape to place it at the feet of my soldier sprite. However, I can’t find this option, is it available somewhere?

Thanks

Hi

There is no such option. The RVOController is always centered at the Transform’s pivot. Earlier in this package’s history there have been such options, but they have always turned out to expose terrible edge cases, unexpected behavior, and they increase the code complexity a lot (and thus reduce performance).
I’d recommend that you instead offset your sprite to match.

Okey then, I’ll try that. Thanks for the answer.

Ok, I’ve done it changing the Sprite pivot to “Bottom” (that’s what you mean it right?) and it seems to work pretty well:


unit2

Thanks!

1 Like