Face forward and right side up

Hi everyone,

I’m wondering if anyone has any ideas on this. For a sprite controlled by the Control Pad, I can turn Face Forward on to make the sprite rotate in the travel direction, but for sprites that have a natural vertical orientation, they are right side up in one horizontal travel direction and upside down in the other. Example:

https://ready.app.link/ENlfOHFFe2

The little fish follows the cursor, but the fish is upside down (on its back) when traveling leftwards.

Has anyone got any ideas for a simple way to keep the fish upright? I’m hoping to avoid resorting to complex solutions involving multiple events that detect travel direction and manage the fish’s orientation accordingly.

Thanks!

3 Likes

You could try having 2 fishes in the same spot and control.
When you press left, the 1st fish hides and show 2nd fish.
When you press right, 2nd fish hides and show first fish.

3 Likes

The control pad also responds to the mouse. Any ideas on how to detect whether a sprite is being dragged to the left or to the right?

Edit: Your suggestion even works with one fish and the “flipped horizontally” property :slight_smile:
https://ready.app.link/5EIjqmSUe2

3 Likes

Hi @auntiel, try use this events:

3 Likes

d’oh! Thank you very much, @Ready, will do and happy to learn something new! :smiley:

Edit: works a charm, here’s the link again: https://ready.app.link/ofRxUua7f2

The event detects both keyboard and mouse inputs:
when system/listener/key down A
or fish/control pad/direction pressed/left
do fish/appearance/flip horiz/yes

3 Likes

…No Problem! :wink:

3 Likes