13,214 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
80
views
SpriteKit dragging a node with a SKPhysicsJointSpring is there a way to get the spring to track its anchor point tightly but damp rapidly?
A significant mechanic of a project I am working on is going to involve dragging objects with your fingers and having the object being dragged interact properly with physics, pushing other objects ...
2
votes
1
answer
266
views
3D positioned SpriteKit content inside RealityKit (non-AR)
I have an ARView, configured with ARView.CameraMode.nonAR (a virtual camera without real-world data), and I want to use ARSKView to render 2D SpriteKit content positioned in 3D space.
According to the ...
0
votes
1
answer
161
views
How to manage interaction in 2D and 3D within a RealityKit game
My game is utilising RealityKit to render a lot of 3D content. In the foreground I want to place a SpriteKit HUD that will contain buttons, and at times, complete overlays of the 3D content.
Right ...
1
vote
0
answers
46
views
Why are some SKView SpriteNodes moving jerkily with motionManager
I am working on an Xcode app that uses a Collection View Controller to display images of various animals. When one of the images is touched a GameView (SKView) opens. Each GameView has balls(sprites)...
0
votes
1
answer
40
views
tvOS SpriteKit: focusBehavior not working for my SKNodes despite setting focusBehavior to .focusable
I’m developing a tvOS game using SpriteKit and trying to make three SKShapeNodes focusable by setting their focusBehavior = .focusable. However, when testing on the Apple TV, the nodes are not ...
0
votes
0
answers
68
views
Accessing a SpriteKit Scene function from the parent SwiftUI view
I have a SKScene class called GameScene that is embedded in the GameView of my SwiftUI app. The SKScene is for a simple solitaire card game. When the game is over, I'd like the user to be able to hit ...
0
votes
0
answers
45
views
SwiftUI: SpriteKit Scene overflows screen when called
I am new to iOS and am porting a simple card game from Android. I'm trying to call a SpriteKit scene from my SwiftUI app. There are many useful posts that show how to do this, and I followed those ...
0
votes
0
answers
45
views
Spritekit: Why is my coordinator value nil when trying to navigate from my GameScene back to my home scene?
I'm new to iOS/Swift/Spritekit and am in the process of migrating a simple solitaire-style card game from Android. At present, I have two scenes:
LauncherScene, which is the home page for the app, ...
0
votes
1
answer
56
views
How do I prevent this code from sometimes ignoring my TouchesEnded handling?
I wrote a teensy app in Swift/SpriteKit/iOS for a button that turns a color when pressed.
It works fairly well except for one thing: If I touch the button in a certain fashion -- a quick half-swipe, ...
0
votes
1
answer
39
views
Spritekit: Implementing a double jump
I'm trying to make a running and jumping game where I want the sprite to be able to do one double jump.
The problem is that when I click the button a second time while the ninja is in the air, it ...
0
votes
2
answers
89
views
Animating dashes sequentially over a spline path in SpriteKit: How can I fix the gaps that appear on the straight sections?
I've created a SpriteNode subclass which is instantiated in the scene as a spline, and then I call the function .animateDottedPath().
I expect the dashes to animate over 5 seconds along the original ...
0
votes
0
answers
42
views
How do i fix a logic error meaning that an incorrect piece is moved in my spritekit game?
I am making a basic chess game in Swift with Spritekit:
func moveSelectedPiece(to newPosition: (Int, Int)) {
guard let pieceToMove = selectedPiece else { return }
// Calculate the ...
0
votes
0
answers
46
views
Lag between SKAction and SKAudioNode when SKScene is paused and resumed
Overview
In my SKScene, I have a SKAudioNode playing an audio file, declared as follows:
var backgroundMusic: SKAudioNode?
and initialized like this:
guard let musicURL = Bundle.main.url(...
0
votes
1
answer
42
views
SpriteKit Beginner: Mouse Node Not Moving to Random Locations
I’m a beginner playing around with SpriteKit, and I created a file called GameScene. It contains only one node called mouse. My goal is to animate the mouse and move it to random locations when the ...
2
votes
0
answers
88
views
Map does not load into the game
I'm currently creating a JRPG-like game in swift, but I have been stuck in implementing a tile map made thanks to spriteKit.
The problem is that the code can't load the map I made.
As I mentioned ...