Player Sprite Facing Direction using Rotations or Anything More Convenient than having to draw left and right costumes.
Author |
Message |
jaki723
![](http://compsci.ca/v3/uploads/user_avatars/2066006973646582ca371d3.jpg)
|
Posted: Wed May 17, 2023 6:14 pm Post subject: Player Sprite Facing Direction using Rotations or Anything More Convenient than having to draw left and right costumes. |
|
|
What is it you are trying to achieve?
I want to have my characters face in the direction of the key pressed. My character is created by the command Pic.Draw(sprite1, playerX, playerY, picMerge)
What is the problem you are having?
I don't know how to flip the sprite so I usually use a flipped version of the sprite and have it switch between costumes, but this sometimes gets complicated especially when I'm adding animations to it. I tried using the Pic.Rotate feature but it ends up making the player spin 360 so I was wondering if anyone could help like with keep my character right side up and make him flip if he going left or right.
Please specify what version of Turing you are using
Turing 4.1.1 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
scholarlytutor
![](http://compsci.ca/v3/uploads/user_avatars/1625682006192930720d11.png)
|
Posted: Thu May 18, 2023 6:01 pm Post subject: RE:Player Sprite Facing Direction using Rotations or Anything More Convenient than having to draw left and right costume |
|
|
Have you tried Pic.Mirror? |
|
|
|
|
![](images/spacer.gif) |
jaki723
![](http://compsci.ca/v3/uploads/user_avatars/2066006973646582ca371d3.jpg)
|
Posted: Fri May 19, 2023 3:05 pm Post subject: Re: Player Sprite Facing Direction using Rotations or Anything More Convenient than having to draw left and right costum |
|
|
I don't know why but it doesn't seem to work and also would it work with multiple costumes I really don't know how to use it i tried and it didn't work not sure whats wrong with it maybe because I'm drawing files and not shapes. |
|
|
|
|
![](images/spacer.gif) |
|
|