skshapenode Questions

5

Solved

I just started doing ios development with swift and I can't figure out how to draw a circle. I'm just trying to draw a circle, set it to a variable and display in on the screen so I can later use i...
Shipowner asked 4/11, 2014 at 4:27

5

Solved

I fount this solution but I can't make it into swift code This what I try var pattern[2]:CGFloat; this var dashed: CGPathRef = CGPathCreateCopyByDashingPath(CGPathCreateCopyByDashingPath(path, ...
Kassala asked 21/1, 2015 at 17:6

1

Currently I am using Core Graphics for a shape and to transform the shape in to a different one with CAShapeLayer and CABasicAnimation path animation. However due to the complexity of the game, If...
Fearless asked 21/12, 2018 at 17:54

7

Solved

How can one draw a line in Sprite-kit? For example if I want to draw a line in cocos2d, I could easily using ccDrawLine(); Is there an equivalent in sprite-kit?
Bedspread asked 30/9, 2013 at 10:33

4

Solved

I have an SKShapeNode (rectangle in this case) which I am trying to rotate along its center. However it is rotating along the screen's bottom left point. Since I cannot set an anchor point for SKSh...
Orvas asked 9/10, 2014 at 17:19

4

Solved

i want draw a circle and put a text in it. what can i do? If i moved or resized the circle , text move or resize too var color = UIColor(red: 0x00, green: 0x44, blue: 0x44, alpha: 1) var Circ...
Picrate asked 30/5, 2015 at 10:19

2

Solved

I have created a circle that is divided into quadrants. I am trying to make the ends of each quadrant rounded with a given gap between each quadrant, but I get some strange behavior. I guess I'm mi...
Polydeuces asked 19/5, 2017 at 5:51

2

Solved

I'm trying to create a subclass of SKShapeNode in swift as SKShapeNode(circleOfRadius: radius) but there is no designated init for it. Anyone have any workarounds or info about why? I'm not sure ...
Levasseur asked 29/1, 2015 at 19:58

1

Say for instance I create SKShapeNode and create children for it (an example is a cross and its two intersecting lines). The cross is the parent, and the intersecting lines are the children. How co...
Resin asked 22/12, 2016 at 4:36

4

Solved

Currently I have drawn 2 lines on the screen which are the same color but both have an alpha value less than 1. When these lines intersect, the intersection is a different color than the rest of th...
Stellular asked 21/12, 2016 at 8:10

1

Aside from the fact that the question asked here : Draw a hole in a rectangle with SpriteKit? has not satisfactorily been answered in its own right, the most significant difference between the two ...

1

Solved

I am trying to create an open circle from a UIBezierPath and turn that into an SKShapeNode which will later be turned into a SKSpriteNode. I had an problem where I could not figure out how to shri...
Ancestress asked 21/10, 2016 at 22:57

1

Solved

I am working on the instructions screen of my game and want to show to the user that they should tap a certain area of the screen. So I want to show an animation where 1) A finger is scaling in...
Axial asked 29/9, 2016 at 16:32

2

Solved

Is it possible to create a folder and have SpriteKit go through that folder, find each image (regardless of name), and create a SKShapeNode for each in that folder (regardless of how many there are...
Kalina asked 1/10, 2016 at 20:47

1

I want to creat a simple circular loader animation circle and border around it which is disappearing I found great frameworks but they use SKShapeNode and SKShapeNode performance is terrible for a...
Mellins asked 14/5, 2015 at 21:13

3

Solved

I'm making a "Achtung die kurve"-clone in Sprite Kit. For the constantly moving lines/players I'm using A CGMutablePathRef along with an SKShapeNode. In the update method I'm doing this // _lineNo...
Fibrinolysin asked 3/7, 2014 at 12:4

1

Solved

How to draw a hole in a rectangle? I want to draw a rectangle which has a empty hole inside it and the background can be show. I am using SKShapeNode to create a rectangle, but I have no idea how ...
Chairman asked 3/1, 2016 at 11:41

4

Solved

I'm trying to fill a SKShapeNode with an Image/pattern but I'm still unsuccessfull. Can you help me solving this or giving me an alternative? I want to create a collidable custom shape (from any S...
Glimpse asked 9/12, 2013 at 20:31

1

Solved

I'm not sure whether there's an issue with the implementation or the way I'm using it. However, it's presenting over 2,400 nodes when it should be ~ 1,250 -(void)drawWeb { //get distance of 50 a...
Emlynne asked 29/7, 2015 at 11:51

1

Solved

The simulator shows the node count, that there are 2 nodes. But why is that? Since there is only one var(ball). Is there a way to create a circle without having it be double the nodes. class GameS...
Homunculus asked 24/7, 2015 at 11:47

3

Solved

I'm still playing around with learning SpriteKit in iOS & have been doing lots of reading & lots of experimenting. I'm confused by something else I've found* regarding coordinates, frames &...
Coursing asked 31/12, 2014 at 8:19

1

I have been delving in to Apple's new Sprite Kit, and been using it for a while now. However I ran into an issue when trying to draw a curved path for an SKShapeNode. It just appears to draw a stra...
Birdwell asked 22/1, 2014 at 21:44

2

Solved

Im using the following code to draw lines in my sprite kit scene but nothing shows up. But the node counts goes up. Can anyone see what could be the problem. Ive been fighting with this code foreve...
Flee asked 25/9, 2014 at 16:21

2

Solved

I want to draw a dashed line in my sprite kit game, I can use SKShapeNode node to draw a normal line like the following: UIBezierPath *_path=[UIBezierPath bezierPath]; //1 CGPoint point1 = CGPo...
Solecism asked 26/12, 2013 at 3:16

1

I am using the repeatActionForever method from SKAction to change the color of an SKShapeNode. Here's my code: SKShapeNode *ship = [SKShapeNode node]; [ship setPath:CGPathCreateWithRoundedRect(CGR...
Bevbevan asked 1/4, 2014 at 19:18

© 2022 - 2024 — McMap. All rights reserved.