Posts

Post not yet marked as solved
0 Replies
487 Views
I have a sequence where I have a SCNScene with one ship already in frame. The goal is to move a new ship in, pause, then smoothly move the camera to a new angle "over the shoulder" of the new ship and do the next step in the code. I get the new ship moving in then no next steps. The code is:     func startAttack() {         let moveAnime = SCNAction.move(to: SCNVector3(-20, 75, 75), duration: 0.5)         attShip.runAction(SCNAction.sequence([moveAnime, SCNAction.wait(duration: 0.5)])) { self.positionCamera() }     }          func positionCamera() {         print("got to position camera")         if Thread.isMainThread {              print("already main thread")             self.overwatchCamera.runAction(SCNAction.customAction(duration: 1, action: { node, timing in                 node.position = SCNVector3(-75, 300, 300)                 node.look(at: SCNVector3(20, 75, -75), up: self.rootNode.worldUp, localFront: self.rootNode.worldFront)             })) {                  self.doAttackRound()             }         } else {             DispatchQueue.main.async {                  print("reset to main thread")                 self.overwatchCamera.look(at: SCNVector3(20, 75, -75), up: self.rootNode.worldUp, localFront: self.rootNode.worldFront)                 self.overwatchCamera.runAction(SCNAction.move(to: SCNVector3(-75, 300, 300), duration: 1)) {                      self.doAttackRound()                 }             }         }      } I tried testing for whether it was on the main thread already, and in my testing it is showing that it gets to the position camera function but it is not on the main thread and tries the option with the DispatchQueue. I left in both of the ways I have tried to execute the camera movement animate, through a custom animation on both the position and look at for the camera, and through a static change to the look at and an animated move of the camera position. Neither one is triggering. Any help would be greatly appreciated. Thanks!
Posted
by Besqware.
Last updated
.
Post not yet marked as solved
1 Replies
962 Views
The way I want to insert weather data is on a page that doesn't have a lot of space so I just wanted to put a text line that said " Weather: Clear with a High of 77 °F" or whatever the actual daily forecast is. Would that meet the attribution requirements? Additionally, with the link to other data sources does that have to be on the same page as the weather display or can I have it on my Help screen?
Posted
by Besqware.
Last updated
.