Lua: castRenderingRay fails to hit height map
To reproduce, in luap mode:
luap
--base test, offset a bit to not hit the player
var = 100
ret = nearby.castRay(self.position + util.vector3(0,var,1000),self.position + util.vector3(0,var,-1000)); print(ret.hitPos)
--now test with renderingRay
nearby.asyncCastRenderingRay(async:callback(function(ret) print(ret.hitPos) end),self.position + util.vector3(0,var,1000),self.position + util.vector3(0,var,-1000))
If you test with an object nearby (at the offset position), you will get the same result both times. If there is only ground beneath you, you will get nil for the second check.
Noticed when changing Ashlander Architect to use castRenderingRay instead of castRay