0

I have:

  • A start coordinate as SCNNode

  • A coordinate pointing North

    dotNode.position = SCNVector3(0, 0, -100)

  • A Angle from the North coordinate to the new coordinate

  • A distance in meters, from the angle point.

Now I would Like to calculate the new spot, but I don't know any math. Is there anyone who could help me with this?

1 Answers1

0

Your title implies GPS-coordinates which means you are probably best converting to core location.

Not sure what the "coordinate as SCNNode" represents in your case as not enough information was given. But you should be able to convert it to CLLocationCoordinate2D. For instance if in your case (0,0,0) is the center of sphere/earth then you are simply looking for a transition between cartesian and polar coordinate systems. Check this answer for instance.

Once you have your location you can use it with some of the answers already provided in other posts such as this one. You will receive a new CLLocationCoordinate2D which you then need to convert back to "coordinate as SCNNode".

Matic Oblak
  • 16,318
  • 3
  • 24
  • 43