skphysicsbody Questions

4

Solved

I have a simple switch-statement that is not that simple. switch(bubble?.name){ //bubble is SKPhysicsBody case "largeBubble": // <= error newBubbleSize = "medium" break; default: newBubble...
Mcadams asked 30/5, 2015 at 18:9

2

Solved

The movement of a physics body circle is too erratic for what I want to achieve. I would like to restrict it so it follows a certain path touching specific points (or a range of points) as shown in...
Coulombe asked 2/9, 2015 at 12:15

2

Solved

Let's say I have a SKSpriteNode that represents a car wheel, with a circular SKPhysicsBody successfully attached to it. The genre would be sideways scrolling 2d car driving game/simulator, obviousl...
Belay asked 13/8, 2015 at 20:8

1

I extended SKSpriteNode with my own class to have more functions. But how can I get this extended node when something 'hits' this node and didBeginContact is called? Because contact.bodyA and con...
Glucosuria asked 2/8, 2015 at 14:27

4

I'm using SpriteKit to write an iOS game that involves a number of labeled balls. I'm constructing these 'rollingBalls' by building a parent SKSpriteNode with 2 children: a) an SKShapeNode (the ac...
Misdemean asked 16/10, 2013 at 21:27

3

Solved

Hi I'm trying to fix this bug with spritekit's physics shape appearing upside down. [SKPhysicsBody bodyWithTexture:monsterTexture size:monsterTexture.size] The first time the monster appears the...
Fishgig asked 2/1, 2015 at 20:17

3

I'm trying to set up some elastic collisions using Sprite Kit. There is an issue with the case of multiple objects resting near each other as I asked in Sprite Kit Physics Collision Issue I am con...
Kittie asked 28/1, 2014 at 17:20

2

I'm having an issue with some collisions. I have two objects equal size and mass. When one collides into another that is at rest I get the correct behavior (grey area in image). When I have two obj...
Karyotin asked 23/1, 2014 at 17:48

3

Solved

I have a game where circular objects shoot up from the bottom of the screen and I would like to be able to swipe them to flick them in the direction of my swipe. My issue is, I don't know how to ca...
Stralsund asked 24/10, 2014 at 16:3

0

Why would the sprite kit physic be different on iOS 7.x vs iOS 8.x??? I have a simple spritekit scene... I have 2 static pins and in between I have sprites which are connected by a spring joint, d...
Wappes asked 20/4, 2015 at 8:38

3

Solved

I use SKNode's xScale property to flip my sprites horizontally. Now, after updating iOS to version 7.1 horizontal flip causes my objects to sink inside the ground. (See animation below). The proble...
Chao asked 17/3, 2014 at 12:25

1

Solved

I am curious about a situation that I came across today when trying to unarchive and copy a SKSpriteNode from one SKScene to another. In the output from the playground below you can see that both l...
Closet asked 26/2, 2015 at 10:32

0

This issue is likely related to this issue. However I do not have sufficient reputation to add to that discussion. When the zRotation of a pinned node reaches (or perhaps becomes close to) positiv...
Alvarez asked 20/2, 2015 at 23:31

1

Solved

The following code gives an error - it appears the physics joints array have the class PKPhysicsJoint. Anyone have any ideas how I can iterate through the joints in Swift? The documentation does s...
Sheltonshelty asked 13/2, 2015 at 14:30

0

Hopefully someone can help. I have been pulling my hair out on this one! Below is some of the control pad code from my Sprite Kit game which uses applyForce to move the hero ship. I like how the co...
Aarika asked 26/1, 2015 at 7:52

1

I've been experimenting with sprite kit a little bit, building a prototype for an idea I have. I've been connecting a string of physics bodies together using an SKPhysicsJointPin, to make a rope (a...
Nursemaid asked 18/7, 2014 at 12:3

1

Solved

I have created a subclass of SKSpriteNode. I connect instances of that class together with joints of type SKPhysicsJointLimit. I do this within my didEndContact(contact: SKPhysicsContact) in my Ga...
Rotor asked 25/12, 2014 at 17:29

2

Solved

I am currently working with the iOS 8 SpriteKit API's and am having a hard time creating an attractive magnetic force with SKFieldNode. I can create an opposing magnetic force just fine, however I ...
Beading asked 5/7, 2014 at 6:38

1

Solved

I am developing a game using Sprite-Kit (Objective-C). It's a game where you control a bird in flight and arrows and other bad projectiles are shot at you from the right/top/bottom sides of the scr...
Hurdle asked 14/10, 2014 at 15:47

2

im having the following issue trying to code a flappy birds clone in Xcode 6 beta 7 with Swift and SpriteKit. After I add the physicsBody property to a SKSpriteNode I cannot change a property of p...
Floatation asked 3/9, 2014 at 7:45

2

Solved

I want my sprites collisions and contacts to be detected, but I don't want them to move dynamically (I just need to know that they've touched). didBeginContact(contact: SKPhysicsContact!) is only ...
Cantle asked 15/6, 2014 at 0:58

2

Solved

I would like to achieve the classic 'headshot' effect in a sprite-kit game. My ideas and attempts: Create separate 'body' and 'head' physicsBodies on the same sprite and pin them with a joint. I...
Shimmer asked 8/7, 2014 at 16:29

1

Solved

As I am porting an iPhone app that uses SpriteKit to iPad, I have been able to scale all the screen elements and font sizes using the height ratio of the iPhone 5 to iPad screen. Everything looks ...
Pipeline asked 14/2, 2014 at 23:24

1

Solved

I am new to xcode's sprite kit and I'm an trying to apply an impulse to a SKSpriteNode's physics body. Here is how I create the scene: self.backgroundColor = [SKColor colorWithRed:0 green:0 blue:0...
Inadequate asked 16/1, 2014 at 13:50

2

Solved

So I have an object that has a physicsBody and gravity affects it. It is also dynamic. Currently, when the users touches the screen, I run the code: applyForce(0, 400) The object moves up about ...
Utricle asked 7/11, 2013 at 11:38

© 2022 - 2024 — McMap. All rights reserved.