'Replicate UIView motion effects on sprite nodes

Views on Swift have a special property that allows them to add effects to it, which looks like this:

view.addMotionEffect(interpolatingEffectCombined)

Note that the interpolatingEffectCombined is just an effect group that is usually defined before anything else, which includes the horizontal and vertical axes of the device to create the motion effect.

I have recently started using sprites to create iOS video games and I want to achieve something like this, but the property I normally use does not exist on this type of node. I have been trying to achieve this with relative values on the "x" and "y" axes, but I have not been able to implement a similar solution. Is there anything similar on SpriteKit that could help me achieve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source