Forum

> > CS2D > Mods > Knife skins bigger than 32x32
Forums overviewCS2D overview Mods overviewLog in to reply

English Knife skins bigger than 32x32

4 replies
To the start Previous 1 Next To the start

old Knife skins bigger than 32x32

maharaja
User Off Offline

Quote
Hello

I got a question about knife skin resolution change. I wanted to create some 'high quality' knife skin, but i had to resize the knife.bmp to 64x64, and the question is:
What will be the 'hotspot' ( place where player holds the knife ). (x, y)

In basic 32x32 image its like 12x24, does in 64x64 it gona 'go' to 24x48.

( sorry for bad english... )

old Re: Knife skins bigger than 32x32

Alistaire
User Off Offline

Quote
32x32 -> 64x64 is an increase by 32 in width and height. You only need the increase in width and height to know your new position, which should be half the increase to keep the sprite centered. Half of 32 is 16, so you add 16 to your current x position, and because 64x64 and 32x32 are both squares the increase in height is the same as width, you add 16 to your current y position too.

1
2
3
4
5
6
--(x, y) is position on canvas size w * h

x' = x + ( w - w' ) / 2
y' = y + ( h - h' ) / 2

--(x', y') is position on canvas size w' * h'
To the start Previous 1 Next To the start
Log in to reply Mods overviewCS2D overviewForums overview