image angle problem...

L

lord_berto

Guest
Ive been stuck on this problem for a while.
Basically its the image angle.
my game is a mobile resolution of 180x320

I have codes in my game that will stretch out everything in the game to fit the display size.
image_xscale=global.gamescale
image_yscale=image_xscale
view_wview=180*global.gamescale
etc
etc...
(at the time i didnt know anything about application surface)

(Now to the problem) The game for some reason when i use image angle, The sprites become distorted.
at 0 degrees the image displays on its proper scale. as the angle increase (45degrees) the image starts to skew itself, when it gets to 90 or so the image is completely flat/gone, until it starts working itself to 180,

I cannot get my head around how to fix it. Ive tried
image_xscale=global.gamescale*(dcos(image_angle)+(dsin(image_angle)))
I know it has to be somewhere around the lines of here.... it just cant fix it.

example below of what seems to happen VVVV
 

Attachments

W

Wraithious

Guest
I might be wrong but looking at your code you have
Code:
image_yscale=image_xscale
That could be interfering with the image_angle argument, possibly you could try having image_yscale=global.gamescale to keep it even
 
L

lord_berto

Guest
I might be wrong but looking at your code you have
Code:
image_yscale=image_xscale
That could be interfering with the image_angle argument, possibly you could try having image_yscale=global.gamescale to keep it even
its still the same. image_xscale=4
image_yscale=4
is the same as saying image_yscale=image_xscale
 
W

Wraithious

Guest
hmm thats strange, the only thing I can think of is that you might have a negative number for xscale and a positive number for yscale (or vice-versa) as you itterate through that
image_xscale=global.gamescale*(dcos(image_angle)+(dsin(image_angle)))
piece of code, as you rotate the object you are constantly changing it's scale.
 
Top