Previously, using addPolyline created terrain intersections and floating lines when drawn across terrain with dramatic elevation changes. Sample line with only start and end points defined (50.107331, -122.891896), (50.052916, -122.960512):
This change subdivides the route by a factor of the terrain's height-map resolution to fit segments along the geometry:
I've also made public a heightForLocalPosition() method that allows users to check the terrainNode's height at a given SCNVector3 location, rather than being limited to CLLocation or raycasting.
Previously, using addPolyline created terrain intersections and floating lines when drawn across terrain with dramatic elevation changes. Sample line with only start and end points defined (50.107331, -122.891896), (50.052916, -122.960512):![img_0048](https://user-images.githubusercontent.com/9599047/46034295-252b2c00-c0b5-11e8-9ac0-aa11b962e256.PNG)
This change subdivides the route by a factor of the terrain's height-map resolution to fit segments along the geometry:![img_0047](https://user-images.githubusercontent.com/9599047/46034293-24929580-c0b5-11e8-9f9a-e0cecf04f30a.PNG)
I've also made public a
heightForLocalPosition()
method that allows users to check the terrainNode's height at a given SCNVector3 location, rather than being limited to CLLocation or raycasting.