Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Set sprite size in pixels
« previous
next »
Print
Pages: [
1
]
Author
Topic: Set sprite size in pixels (Read 3942 times)
ilyahan
Newbie
Posts: 1
Set sprite size in pixels
«
on:
July 09, 2013, 01:13:01 pm »
I have a sprite which size is 14x14 px. How can I set size of this sprite in pixels?(I use tk2dCamera)
My code:
Code:
[Select]
scale.x=newSize.x/14f;
scale.y=newSize.y/14f;
But it doesn't work
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Set sprite size in pixels
«
Reply #1 on:
July 09, 2013, 01:41:04 pm »
If you use the tk2dCamera, and your sprite is set to "Use tk2dCamera", the sprite will already be pixel perfect. If its pixel perfect to start with, your code should work.
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Set sprite size in pixels