1

Working on an iOS game right now using swift, and am having trouble trying to get the effect i want.

Basically, i have a Dpad for moving around, it's simply one sprite node that displays the image and then some transparent rectangles overtop to trigger the actions.

I want the dpad to tilt downwards slightly in the direction the user taps and holds, to simulate feedback like on a real life direction pad. And by downwards, i mean some kind of 3d flip effect, but only applied slightly. Does that make sense? Is that possible with any kind of actions on an SKSpriteNode?

I've tried using SKAction.scaleX since when you set it to -1 it fully flips the node, but does an actual scale when it's not -1.

Any tips or advice is greatly appriciated!

Shan Robertson
  • 2,742
  • 3
  • 25
  • 43
  • 1
    Have you tried the answers described here? http://stackoverflow.com/questions/20125224/how-to-rotate-an-skspritenode-around-the-nodes-y-axis – Pochi May 12 '17 at 01:26
  • 1
    ahhh damn, looks like i'm just going to have to make a sprite atlas out of it and load different sprites i think – Shan Robertson May 12 '17 at 01:51
  • Or you could use the second answer where you create its own scene so that you can "morph" it using the UIView 3d transform methods. – Pochi May 12 '17 at 01:54
  • Possible duplicate of [How to rotate an SKSpriteNode around the node's Y-axis?](http://stackoverflow.com/questions/20125224/how-to-rotate-an-skspritenode-around-the-nodes-y-axis) – ZGski May 12 '17 at 04:09

0 Answers0