Rayintersect

From GMLwiki

Jump to: navigation, search
  • pt:P3 dir:P3 → t:F e:E p:P3 flag
  • pt:P3 dir:P3 → 0

[edit] Description

shoots a ray (pt,dir) to the mesh

  • flag = 0: no hit, no further items
  • flag = 1: face was hit
  • flag = 2: edge was hit
  • flag = 3: vertex was hit

t is the parameter for the hit point p: p = pt+t*dir e is the edge that was hit, for face hit (flag=1) it’s the edge closest to p

Personal tools