Hi guys. Basically, I want to get my whale to change to looking right if i tilt my phone to the right, and change to looking left if I tilt my phone to the left. However, for some reason, nothing changes for like 99% of the times I tilt my phone. Can you please take a look at my blocks and tell me what's wrong?
Oh sorry, I forgot to upload the picture of the orientation sensor blocks. I will upload later. For now, the heading blocks work, if I tilt to the right, it moves right, and vice versa.
Assuming you are actually calling that procedure after changing the Sprite Heading, here are corrections to your logic:
If heading between 90 and 270 (summarizing your test in the first if/then)
then set Whale Picture to WhaleLeft (assuming that points left, not having seen it)
ELSE set Whale Picture to WhaleRight (in the same test.)
Your second if/then test was overriding the first.
Feel free to export and upload your aia to allow testing.
Also, I read your suggestion.
I thought about what you wrote for the turning. Should I set the Whale Picture to Whale RIGHT for heading between 90 and 270 instead?