﻿ Unreal Software - Thread: Knife skins bigger than 32x32

# Forum

CS2D Mods Knife skins bigger than 32x32

# Knife skins bigger than 32x32

4 replies
Goto Page
1
11.11.14 05:02:38 pm
maharaja
User
Offline
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... )
11.11.14 05:05:20 pm
Alistaire
User
Offline
(28, 40)
11.11.14 05:11:30 pm
maharaja
User
Offline
How can i calculate the (x, y) ( of 'hotspot') if i wanted to do bigger ones is there some kind of 'formula' to do this?

btw Thanks
11.11.14 05:33:57 pm
Alistaire
User
Offline
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.

Code:
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'
11.11.14 05:46:46 pm
maharaja
User
Offline
@ Alistaire: Again thank you
1
﻿