Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Merge a small sprite over a large sprite at it's center?

$
0
0
So I am using Unity, I have a large sprite and a small sprite that I am merging with SetPixel, in code c#. This was working fine while both sprites was the same size as I would just multiply the two pixels. Now when I try it I get an error because it doesn't fill the array, so I filled in with a blank vector, it works, except now the sprite is in the upper left corner. What is the math for merging any larger sprite with a smaller one at it's center?

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>