Post

Replies

Boosts

Views

Activity

How do I stop a node as it is moving around a UIBezierPath and then restart the moving from where it stopped?
I have an oval UIBezierPath with a moving SKSpriteNode, I stop its motion and record the stopped position. I then restart this motion and want it to restart where it initially stopped. Works great if motion is not stopped. Movement is great around entire oval Path. Also works great as long as this stop-restart sequence occurs along the top half of the oval UIBezierPath. However, I have problems along the bottom half of this Path -- it stops okay, but the restart position is not where it previously stopped. My method to create this oval UIBezierePath is as follows: func createTrainPath() { trainRect = CGRect(x: tracksPosX - tracksWidth/2, y: tracksPosY - tracksHeight/2, width: tracksWidth, height: tracksHeight) // these methods come from @DonMag trainPoints = generatePoints(inRect: trainRect, withNumberOfPoints: nbrPathPoints) trainPath = generatePathFromPoints(trainPoints!, startingAtIDX: savedTrainIndex) } // createTrainPath My method to stop this motion is as follows: func stopFollowTrainPath() { guard (myTrain != nil) else { return } myTrain.isPaused = true savedTrainPosition = myTrain.position // also from @DonMag savedTrainIndex = closestIndexInPath( trainPath, toPoint: savedTrainPosition) ?? 0 } // stopFollowTrainPath Finally, I call this to re-start this motion: func startFollowTrainPath() { var trainAction = SKAction.follow(trainPath.cgPath, asOffset: false, orientToPath: true, speed: thisSpeed) trainAction = SKAction.repeatForever(trainAction) myTrain.run(trainAction, withKey: runTrainKey) myTrain.isPaused = false } // startFollowTrainPath Again, great if motion is not stopped. Movement is great around entire oval Path. Again, no problem for stopping and then restarting along top half of oval .. the ohoh occurs along bottom half. Is there something I need to do within GameScene's update method that I am missing? For example, do I need to reconstruct my UIBezierPath? every time my node moves between the top half and the bottom half and therein account for the fact that the node is traveling in the opposite direction from the top half?
2
0
863
Nov ’24
100% Inappropriate Behavior of a App Reviewer
Someone somewhere in Apple Development needs to do something. This just cannot be allowed to continue. This has been reported by many others before me .. but nothing changes. What their Reviewers do borders on Assault which is a Crime. How much longer? The very capable folk such as Quinn are tarnished by working along side some of the Reviewers. I truly feel sorry for Quinn. Submitted my Monster Paddle Pong App that operates on Apple TV and iPad with a Game Controller.  SO the Tester uploads my App to their iPad and starts poking their finger all over the screen .. and NOTHING happens.  Maybe their reading skills aren’t ample because that Game Controller requirement is delineated in sentence #1.  Promotional Text: Monster Paddle Pong is FUN! to play on a iPad + Apple TV with a Extended Game Controller. Match wits with your skill to react quickly. See the Description for more info. Description Text: Monster Paddle Pong is FUN! to play on a iPad or Apple TV with a Game Controller. It mischievously matches wits with your skill to react quickly. It's 100% free, so give it a GO!  Pressing the Right Shoulder Button starts the Game and causes the Dinossaur Ball to start moving .. and unless the Ball is moving the Monster Paddle will not move. As a matter of fact, until this Right Shoulder Button is first pressed, only the Left Shoulder Button works (described below). This makes sense because after all what’s so hard in hitting a stationary target? Right? Use your Game Controller’s A, B, X, Y buttons & the Joysticks to move the Monster Paddle and hit the moving Dinossaur Ball. If you’re successful then your Score in the upper right corner advances. If instead your Monster Paddle hits one of the 4 Walls, your score decreases by 1. All this is graphically depicted in the About Scene which can be accessed by pressing your Controller’s Left Shoulder Button once. BTW, press this Left Shoulder a 2nd time, and you will see my Credits Scene. I don’t want to get too detailed here because a big part of FUN! is the thrill of Discovering. So, feel free to DISCOVER, most notably pressing all the buttons on your Controller to see the MAGIC! each of them makes happen.
9
0
1.8k
Feb ’23