Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Player Sprite Facing Direction using Rotations or Anything More Convenient than having to draw left and right costumes.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jaki723




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
scholarlytutor




PostPosted: 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?
jaki723




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: