Questions tagged [skspritenode]

An SKSpriteNode is a node that draws a textured image, a colored square, or a textured image blended with a color.

An SKSpriteNode is a node that draws a textured image, a colored square, or a textured image blended with a color.

SKSpriteNode is part of , a graphics rendering and animation infrastructure to animate arbitrary textured images, or sprites.

is available on iOS () and OS X ()

Click Here for Apple Docs.

1417 questions
0
votes
1 answer

Using Sprite Kit to draw multiples of the same sprite as a background

So what I am trying to do is use a holder (the SKSpriteNode *sprite) and load from a set of three sprites: coral water base. What I intend to do is based on previously created NSMutableArrays, draw that particular texture at positions across the…
0
votes
1 answer

-(void)didBeginContact is not being called. Thoughts?

#import "collisionTestMyScene.h" const static int nodeBitMask = 0x1 << 0; const static int node1BitMask = 0x1 << 1;; @implementation collisionTestMyScene -(id)initWithSize:(CGSize)size { if (self = [super initWithSize:size]) { /*…
0
votes
2 answers

Ellipse SKPhysicsBody

Which SKPhysicsBody body type would I use to create an elliptical physicsBody? I know I could make a curve out of straight lines and just have it not be a real ellipse, but it seems like there must be some way to squish a circle or create one?
Max Hudson
  • 9,961
  • 14
  • 57
  • 107
0
votes
3 answers

Referencing a scene from another class in Sprite Kit

Ok, i've been trying to figure this out and searching the web and the forum but I haven't had any luck yet. What I want to do is the following. I have a MainMenuScene which is a SKScene. Since I have added a number of SKActions and other things in…
μ4ρκ05
  • 585
  • 2
  • 5
  • 16
0
votes
2 answers

How to make a SKSpriteNode react for only certain collisions

In this project there are two players and both can shoot. When the opposite players bullets hits a ship, it lowers their health and disappears, this works fine. The problem is I don't want either the ships or the bullets to react to colliding into…
Lucas Bullen
  • 211
  • 5
  • 14
0
votes
1 answer

How to obtain zRotation of a sprite relative to world coordinates?

For example if you have a rotated sprite, to which you add another rotated sprite, and so on. How would you determine the on-screen zRotation of a sub-sprite, or the "absolute" rotation of a sprite?
openfrog
  • 40,201
  • 65
  • 225
  • 373
0
votes
1 answer

Is it possible to tell Xcode to not rotate textures in the generated Texture Atlas?

I am encountering very poor performance with a long dance animation with 70 frames. Sprite Kit stutters often and the SKSpriteNode has small dimensions. In the atlas I see many of my frames are rotated 90 degrees. I get the impression Sprite Kit…
openfrog
  • 40,201
  • 65
  • 225
  • 373
0
votes
1 answer

Change the Color of CGPOINT

i have managed to create a SKspritenode , Make it move around , although i want to change the color of every CGPOINT that the node Passes by . Anyway to do this ?
TALAA
  • 6,184
  • 1
  • 13
  • 21
0
votes
2 answers

Draw the Path of a Moving SKSpritenode

I am Trying to use the new SKSpritenode , i have managed to create a Spritenode move it around the screen , although i want the Spritenode leaves a trace( color ) where it moves. the code to create the Sprite node & my attempts to create a…
TALAA
  • 6,184
  • 1
  • 13
  • 21
0
votes
1 answer

Difference between Initializing with Superclass class method vs init method

I am trying to understand what is difference between initializing a subclass using [super init] vs [SuperClassType classMethod]. Below are the code examples: -(instancetype)initWithAPPImageName:(NSString *)appImageName { SKTextureAtlas *atlas…
Sureyya Uslu
  • 325
  • 4
  • 10
0
votes
1 answer

How to arrange SKSpriteNodes in a given pattern

I have several similar SKSpriteNodes that I'd like to arrange in specific patterns on the screen. Specifically I'd like them to arrange as a circle around another central SKSpriteNode. I'm putting the x,y for each in an array and using…
user2887097
  • 309
  • 4
  • 12
0
votes
1 answer

SpriteKit, get rect of transparent value

SKSpriteNode is new to me. For the image below, I am wondering what are some ways I can get the rect of the non-transparent part using sprite kit.
danny huang
  • 155
  • 9
0
votes
1 answer

Why are my SKPhysicsJoints not working?

I have a SKSpriteNode fish and an extended SKSpriteNode class hook; I'm trying to join these together when they come in contact, and later have them move together. I am using this code : [fish removeAllActions]; NSLog(@"Fish anchor is is (%f,%f)",…
pikovayadama
  • 808
  • 2
  • 8
  • 26
0
votes
2 answers

SKSpriteNode zPosition issue using the scene coordinates

SpriteKit I have searched the documentation and stackoverflow, but have not been able to find helpful material. As users drag my SKpriteNodes around the screen, I am updating the sprite's zPosition to correctly show the sprite in front of other…
Justin Moore
  • 884
  • 2
  • 9
  • 22
0
votes
2 answers

SpriteKit SKTexture Crash

Not sure why this doesnt work. It crashes with EXC_BAD_ACCESS when it tries to create the ship node. SKTexture *tex = [SKTexture textureWithImageNamed:@"Spaceship"]; CIFilter *filter = [CIFilter filterWithName:@"CISepiaTone"]; [filter setValue:@0.6…
DogCoffee
  • 19,820
  • 10
  • 87
  • 120