GE Lua Documentation

Press F to search!

containsOBB_point

Definition


-- @/lua/common/mathlib.lua:1398

function containsOBB_point(c1, x1, y1, z1, p)
  tmpv1:setSub2(c1, p)
  return abs(tmpv1:dot(x1))<=x1:squaredLength() and abs(tmpv1:dot(y1))<=y1:squaredLength() and abs(tmpv1:dot(z1))<=z1:squaredLength()
end

Callers

@/lua/ge/spawn.lua
      else
        if containsOBB_point(bbCenter, axis0 * halfExtentsX, axis1 * halfExtentsY, axis2 * halfExtentsZ, nodePos) then
          return true
@/lua/ge/extensions/core/camera.lua

  if not containsOBB_point(bbCenter, bbHalfAxis0, bbHalfAxis1, bbHalfAxis2, camPos) then return 0 end
@/lua/ge/extensions/flowgraph/nodes/events/customizedTriggerBox.lua
      --debugDrawer:drawSphere(vec3(cPos), 0.5, ColorF(0.91,0.05,0.48,0.5))
      inside = inside or containsOBB_point(self.trigger.pos, self.trigger.x, self.trigger.y, self.trigger.z, pos)
    else
@/lua/ge/extensions/career/modules/tether.lua
  end
  return not containsOBB_point(t.p1, t.x1, t.y1, t.z1, playerPos)
@/lua/ge/extensions/gameplay/drift/stuntZones/driftThrough.lua
function C:isPlayerInside()
  local isInside = containsOBB_point(self.data.zoneData.pos, self.data.x, self.data.y, self.data.z, gameplay_drift_drift.getVehPos())
  if not isInside then
@/lua/ge/extensions/gameplay/drag/utils.lua
  local x, y, z = boundary.rotation * vec3(boundary.scale.x,0,0), boundary.rotation * vec3(0,boundary.scale.y,0), boundary.rotation * vec3(0,0,boundary.scale.z)
  return containsOBB_point(boundary.position, x, y, z, racer.vehPos )
end