Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Possible bug with agk::SetSpriteScale in native

Author
Message
Serguei Fedorov
9
Years of Service
User Offline
Joined: 19th Dec 2014
Location:
Posted: 20th Dec 2014 12:30
I am trying to set a specific scale, for instance in the X direction. However, when try to set the X scale like so:



I get a width of 1000 regardless of the value I set for width. The same happens if I do:



Setting the both width and height to the same value seems to result in correct behavior
Serguei Fedorov
9
Years of Service
User Offline
Joined: 19th Dec 2014
Location:
Posted: 20th Dec 2014 15:21
Scaling is for scale... duh.

SetSize is the function that I wanted.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 20th Dec 2014 15:32 Edited at: 20th Dec 2014 15:34
The scale parameters are percentages in the range 0-1. Where 1 = 100%

You are scaling by the sprites dimensions, so you will get crazy results!

Try this:


Or maybe look at using SetSpriteSize() instead.

Login to post a reply

Server time is: 2024-11-25 14:46:46
Your offset time is: 2024-11-25 14:46:46