Here's a really odd thing! I apparently have an integer
value which changes of its own accord...
or perhaps some strange Blitz blip not adding correctly.
Let me explain:
In my game ( a side scrolling platformer) the player can
only turn left or right - 90 or 90 degrees ie.
only 180 degrees either way. On land his 'turn' variable
is set to 12 degrees...in water he turns slower at 6 degrees.
Note that both integer values neatly divide into 180.
The problem I have is that the rotations are going out of
synch by strange steps - 10, 15 etc and then they remain
screwed up!!
Please look at the screen shot - the debuglog tells it all
and captures the moment when the rotations go weird.
Environment tells me where I am :
2 is in water
1 is on land
-1 is a special water exit routine that will finish off
any on going 'left or right' rotations whilst leaping out
of the water (or simply process any new turns as usual
that may have been initiated). These need to be completed
as the 'turn' value will change to 12 on land and would not
otherwise finish rotating either on -90 or 90 degrees if
the two different turn values are intermingled during a
single Y rotation.
Water & Special rotations tells me the player's Y rotation
value and it's by reading down this list we can spot a
turn in progress and then see it go out of synch! ..and
this even while the actual turn value is displayed as a
correct number; in this case '6'.
Read down far right numbers on the list until you come to
97! It's bloody impossible!! I'm supposed to be adding 6
to the value of 90 and get 97???
Can anybody tell me what's going wrong here? It's got me
chewing the desk I'm at here!
Could tweening upset these calculations at all? Though it
simply doesn't show in the debuglog.
value which changes of its own accord...
or perhaps some strange Blitz blip not adding correctly.
Let me explain:
In my game ( a side scrolling platformer) the player can
only turn left or right - 90 or 90 degrees ie.
only 180 degrees either way. On land his 'turn' variable
is set to 12 degrees...in water he turns slower at 6 degrees.
Note that both integer values neatly divide into 180.
The problem I have is that the rotations are going out of
synch by strange steps - 10, 15 etc and then they remain
screwed up!!
Please look at the screen shot - the debuglog tells it all
and captures the moment when the rotations go weird.
Environment tells me where I am :
2 is in water
1 is on land
-1 is a special water exit routine that will finish off
any on going 'left or right' rotations whilst leaping out
of the water (or simply process any new turns as usual
that may have been initiated). These need to be completed
as the 'turn' value will change to 12 on land and would not
otherwise finish rotating either on -90 or 90 degrees if
the two different turn values are intermingled during a
single Y rotation.
Water & Special rotations tells me the player's Y rotation
value and it's by reading down this list we can spot a
turn in progress and then see it go out of synch! ..and
this even while the actual turn value is displayed as a
correct number; in this case '6'.
Read down far right numbers on the list until you come to
97! It's bloody impossible!! I'm supposed to be adding 6
to the value of 90 and get 97???
Can anybody tell me what's going wrong here? It's got me
chewing the desk I'm at here!
Could tweening upset these calculations at all? Though it
simply doesn't show in the debuglog.