Hello,
I’m lost here tried so much i cant get it to work properly, the rays all cast in a cone shape.
I am trying to cast rays to all 8 directions from the hit position of a ray.
but it seems it cast all rays in a cone shape to the origin of the game engine, i’m confused, why would it do that?
edit i have used the terrain/spawner orientation vectors as well with same results i thought lets try with simple x/y vectors
#edit oh boy stupid mistake, calculated the vectors on the wrong way got it working now.
manual vector creation
vec_north = ray[1] + Vector([0,1,0])
vec_north_east = ray[1] + Vector([1,1,0])
vec_east = ray[1] + Vector([1,0,0])
vec_south_east = ray[1] + Vector([1,-1,0])
vec_south = ray[1] + Vector([0,-1,0])
vec_south_west = ray[1] + Vector([-1,-1,0])
vec_west = ray[1] + Vector([-1,0,0])
vec_north_west = ray[1] + Vector([-1,1,0])
render.drawLine(vec_north, ray[1], [1,0,0])
render.drawLine(vec_north_east, ray[1], [1,0,0])
render.drawLine(vec_east, ray[1], [1,0,0])
render.drawLine(vec_south_east, ray[1], [1,0,0])
render.drawLine(vec_south, ray[1], [1,0,0])
render.drawLine(vec_south_west, ray[1], [1,0,0])
render.drawLine(vec_west, ray[1], [1,0,0])
render.drawLine(vec_north_west, ray[1], [1,0,0])