Group Group Group Group Group Group Group Group Group

Using Xcode: Version 10.2.1 - final CatNap project - Chapter 7: Scene Editor

I ran the original final CatNap project from chapter 7. And It runs great!. However, (using the scene editor) I changed the RotateToAngle Action duration property from its current value of 2 to 1 and the changed it back to 2 (so the editor will detect that the file has change). And then save the Cat.sks file. Run it again and the cat tail WILL NOT animate.

Any Ideas what’s going on?

Thanks

The cat node has a tendency to get paused. This can be fixed by doing

isPaused = false

inside of func didMoveToScene() in the class CatNode.

Also, when you get to them, do

catAwake.isPaused = false

in func wakeUp(), and

catCurl.isPaused = false

in func curlAt(scenePoint: CGPoint).

It is possible to avoid getting isPaused set to True while using the storyboard, but it takes vigilance, so fixing it in code is easier.

Here is one of the old posts on the topic (search phrase is “like a boss”). The last post is on not letting it get tweaked on the storyboard.

1 Like

Hi, (many months later)

I came across this problem, read this and related posts and believed the .isPaused property was the problem. However, some reported that simply changing the isPaused property didn’t get the animations playing.

Googling more generally the problem, I came across similar problems. The simplest solution does indeed setting the property too false. HOWEVER, the trick is in fact to first set the property to true then immediately to false:

scene.isPaused = true
scene.isPaused = false

alternatively, if it does not work on the scene, set it on the view:

view.isPaused = true
view.isPaused = false

calling the isPaused property on the scene will iterate through all the nodes including the reference object to the cat.

Cheers