I don't understand the difference between 0.66 and 2/3
But if I am using 2/3 my Sprite is not shown on the screen.
img = LoadImage ... 1920 x 1080
spr = CreateSprite (img)
Virtual Resulution and WindowSize is 1280 x 720
Thanks for help.
works:
w#=0.66
h#=0.66
img = LoadImage("YourImageHere_1920x1080px.jpg")
spr = CreateSprite(img)
SetSpriteScale(spr,w#,h#)
Do
Sync()
Loop
does not work
w#=2/3
h#=2/3
img = LoadImage("YourImageHere_1920x1080px.jpg")
spr = CreateSprite(img)
SetSpriteScale(spr,w#,h#)
Do
Sync()
Loop
Don't get 0.666 from 2/3 in a value.
w#=(2/3)
w=0.66
do
if GetRawKeyPressed(27) : end : endif
Print( str(ScreenFPS())) //+ " Q: "+str(GetParticleDrawnQuadCount()) )
Print(str(w#))
Print(str(w))
Sync()
loop
---- Can't edit the title, but Float is broken in my AGK2 version I think
w#, w, wf as float are all 0.000 or 0
w# = 2.0 / 3.0 works, but how could I get two Integers to a float and why do I have to? Okay, I can do the following: Integer / Integer * 1.0 to get it cast to a float
Solution?
SetSpriteScale(spr,1.0/1920*GetVirtualWidth(),1.0/1080*GetVirtualHeight())