- Home /
The question is answered, right answer was accepted
Would love some advice, based on a reply of yours about 2D sprite flipping. (U5.3)
@JoeStrout I hate to bother you, but I saw your post on flipping 2D characters in Unity 5.3 using the SpriteRender.flipX; and was wondering if you might be able to give me some advice on how to implement this into code, I am nearly a complete novice at coding, only having started about a week ago, and have a post about the subject here. Now what I think I should be doing, and please correct me if I'm wrong, is: 1. create a bool titled (atlo) flipx 2. declare bool with getcomponent(spriterenderer.flipx) in start method 3. code on L key press !flipx
I ran into a problem with part 2 though, monodev is saying that spriterenderer.flipx is a property used as a type, I'm actually a little confused on what that means, and how to work around it. Any feedback is worth more than gold to me right now, so naturally I would really appreciate it. :) -Reykur
fixed it with GetComponent().flipX = true; and respectively false, on keydown and keyup in input method.
Please don't use the Unity Answers site as a way to contact someone directly. You could have ins$$anonymous$$d used the P$$anonymous$$ feature in the Unity Forum. Or, even @-mentioning me in your forum thread there would have been more appropriate.
But, good job figuring it out!
Follow this Question
Related Questions
(2D sidescrolling platformer) Flipping my character right or left depending on the mouse? 2 Answers
How to monitor the movment speed of a 2D sprite 0 Answers
Player Flipping and Shot/Tilemap bugs 0 Answers
C# 2D platformer: How to have player always face center? 0 Answers
If statement not working 2 Answers