Help with flipping sprite to left & right when left arrow key, and right arrow key pressed

What's problem you are encountering?
this https://snap.berkeley.edu/snap/snap.html#present:Username=funtime_foxy666&ProjectName=The%20darkness%20around%20you&editMode&noRun

It'll act weird and flip both left/right whenever I press the left and right arrow keys

What have you tried that didn't work?
I pressed only face left/right, and used this:
image

thats the only thing I know how to do that will flip the sprite left/right, but it will face left whenever I press the right key.

"Could not fetch project." I'm pretty sure you haven't shared it yet. Can you do that first?

Oh! I'm sorry, I thought I already shared it

There are two ways to do this. One is to make a second costume by duplicating the costume, then opening it in the paint editor and flipping it around the vertical axis. Then use NEXT COSTUME to flip.

The other way is to set the rotation mode to left-right (see the Manual page 108) and then you can set direction to 90 or 270.

I don't see any rotation blocks in there. Also, the code you claimed to use doesn't work; you should use the "point in direction" block instead.

That's because I didn't save it, and I only just added the rotation blocks a while ago and saved it just now

Either way, you should follow what bh and I said and use the "point in direction" blocks. If you revert to the standard rotation option and try your old script, you will see why it gives confusing results. Hopefully that makes more sense.

I used that, but when I added it, it plays slower :\

Tbh I don't know if it's just my google meet that's making things slower, or it plays slower with everyone:

https://snap.berkeley.edu/snap/snap.html#present:Username=funtime_foxy666&ProjectName=The%20darkness%20around%20you&editMode&noRun

It doesn't seem to be slow for me.

google meet

Video calling is like, one of the most processor-intensive things you can do while running a Snap project. It runs fine for me, try it after the meet.

Then that just means that the slowness was because of my meet.

@the2000 it's fine now XD

Nevermind, it slows down a bit when holding both the left arrow and right arrow for me.

I think this is because Snap! has to make a flipped version of the costume when you rotate it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.