simpleDebugText3d
Definition
-- @/lua/common/utils.lua:1471
function simpleDebugText3d(text, pos, radius, sphereColor, dir)
if text then
debugDrawer:drawTextAdvanced(pos, String(tostring(text or "")), ColorF(1,1,1,1), true, false, ColorI(0,0,0,192))
end
if radius and radius > 0 then
debugDrawer:drawSphere(pos, radius, sphereColor or ColorF(1,1,1,0.25))
end
if dir then
local x,y,z = vec3(radius,0,0)*dir,vec3(0,radius,0)*dir,vec3(0,0,radius)*dir
simpleDebugText3d(nil, pos + x, 0.1, ColorF(1,0,0,0.25))
simpleDebugText3d(nil, pos + y, 0.1, ColorF(0,1,0,0.25))
simpleDebugText3d(nil, pos + z, 0.1, ColorF(0,0,1,0.25))
end
end
Callers
@/lua/common/utils.lua
local x,y,z = vec3(radius,0,0)*dir,vec3(0,radius,0)*dir,vec3(0,0,radius)*dir
simpleDebugText3d(nil, pos + x, 0.1, ColorF(1,0,0,0.25))
simpleDebugText3d(nil, pos + y, 0.1, ColorF(0,1,0,0.25))
simpleDebugText3d(nil, pos + x, 0.1, ColorF(1,0,0,0.25))
simpleDebugText3d(nil, pos + y, 0.1, ColorF(0,1,0,0.25))
simpleDebugText3d(nil, pos + z, 0.1, ColorF(0,0,1,0.25))
simpleDebugText3d(nil, pos + y, 0.1, ColorF(0,1,0,0.25))
simpleDebugText3d(nil, pos + z, 0.1, ColorF(0,0,1,0.25))
end
@/lua/ge/extensions/career/modules/delivery/vehicleTasks.lua
local valid, res = destinationPs:checkParking(taskData.vehId)
simpleDebugText3d(valid and "Valid" or "Invalid", destinationPs.pos + vec3(0,0,2), 0.25, valid and ColorF(0,1,0,0.25) or ColorF(1,0,0,0.25))
destinationPs:drawDebug()
@/lua/ge/extensions/gameplay/markers/walkingMarker.lua
for idx, area in ipairs(self.doors or {}) do
--simpleDebugText3d(idx, area.iconPos, 0.25)
screenObjTemp = scenetree.findObjectById(area.screenObjId) or nil
end
--simpleDebugText3d(area.screenTimer, screenObjTemp:getPosition())
area.screenTimer = area.screenTimer - data.dt
@/lua/ge/extensions/career/modules/delivery/general.lua
for _, container in ipairs(mostRecentCargoContainerData) do
simpleDebugText3d(container.name, container.position, 0.15, colorForAttachmentDebug[container.attachmentStatus])
end
@/lua/ge/extensions/util/maptiles.lua
local filename = string.format("%s/%s/%d/%d/%d.png", outputDirectory, currentLevelName, currentZoomLevel, tile.xIndex, tile.yIndex)
simpleDebugText3d(filename, tile.tileCenterPos)
end
@/lua/ge/extensions/career/modules/tether.lua
debugDrawer:drawLine(playerPos, t.p1, ColorF(0,0,1,0.1))
simpleDebugText3d(string.format("%0.1fm", (t.p1-playerPos):length()), lerp(playerPos, t.p1, 0.5))
end
debugDrawer:drawLine(playerPos, t.p1, ColorF(0,0,1,0.1))
simpleDebugText3d(string.format("%0.1fm", (t.p1-playerPos):length()), lerp(playerPos, t.p1, 0.5))
end
debugDrawer:drawLine(t.p1, t.p2, ColorF(0,0,1,0.1))
simpleDebugText3d(string.format("%0.1fm", (p-playerPos):length()), lerp(playerPos, p, 0.5))
end
debugDrawer:drawLine(playerPos,vehPos, ColorF(0,0,1,0.1))
simpleDebugText3d(string.format("%0.1fm", (playerPos - vehPos):length()), lerp(vehPos, playerPos, 0.5))
--log("I","Tether: " .. string.format("%0.1fm", (playerPos - vehPos):length()))
@/lua/ge/extensions/gameplay/markers/crawlMarker.lua
if area then
--simpleDebugText3d(idx, area.iconPos, 0.25)
@/gameplay/missionTypes/delivery/customNodes/VehicleInTargetAreaNode.lua
end
--simpleDebugText3d("max: " .. max .. " inside: " .. inside, center, math.sqrt(sqrDist), ColorF(0,0,1,0.25))
self.pinOut.max.value = max
@/lua/ge/extensions/gameplay/markers/bigmapMarker.lua
local bigMapMarkerAlpha = clamp(smootherVal,0,1)
--simpleDebugText3d(string.format("%0.2f %s %s %0.2f %d",bigMapMarkerAlpha, self.visible and "V" or "I", data.bigmapTransitionActive and "T" or "N", data.dt, self.id), self.pos)
bigMapMarkerAlpha = 1-((1-bigMapMarkerAlpha)*(1-bigMapMarkerAlpha))
@/lua/ge/extensions/gameplay/markers/missionMarker.lua
local hitDist = castRayStatic(data.camPos, tmpVec, rayLength, nil)
--simpleDebugText3d(string.format("distanceFromMarker: %0.3f, missionIconAlphaDist: %s, focus: %s, hitDist: %0.4f, rayLength: %0.4f", distanceFromMarker, missionIconAlphaDist, self.cluster.focus, hitDist, rayLength), iconInfo.worldPosition, 1)
if hitDist < rayLength then
local missionIconAlpha = clamp(self.iconAlphaSmoother:getWithRateUncapped(missionIconAlphaDist * data.globalAlpha, data.dt, iconAlphaRate), 0,1) * bigMapAlpha
--simpleDebugText3d(string.format("bigMapActive: %s, bigmapalpha: %s, missionIconAlpha: %s, missionIconAlphaDist: %s, globalAlpha: %s, focus: %s", bigMapActive, bigMapAlpha, missionIconAlpha, missionIconAlphaDist, data.globalAlpha, self.cluster.focus), self.pos, 1)
end
--simpleDebugText3d(string.format("missionIconAlpha: %0.3f", missionIconAlpha), self.pos)
@/lua/ge/extensions/gameplay/markers/parkingMarker.lua
--simpleDebugText3d(string.format("%0.1f %0.1f %0.1f %0.1f",lineColorF.r, lineColorF.g, lineColorF.b, lineColorF.alpha), self.pos + vec3(0,0,iconHeight), 0.25)
@/lua/ge/extensions/gameplay/markers/gasStationMarker.lua
for idx, area in ipairs(self.pumps or {}) do
--simpleDebugText3d(idx, area.iconPos, 0.25)
local overlap = (data.cruisingSpeedFactor < 1) and overlapsOBB_OBB(data.bbCenter, data.bbHalfAxis0, data.bbHalfAxis1, data.bbHalfAxis2, area.areaPos, area.xVec, area.yVec, area.zVec)
@/lua/ge/extensions/gameplay/markerInteraction.lua
end
--simpleDebugText3d(dumps(marker.cluster.clusterId), marker.cluster.pos, 0.25)
end
end
--simpleDebugText3d(core_groundMarkers.getPathLength(),core_groundMarkers.getTargetPos(), 0.25)
if core_groundMarkers.getPathLength() < 7 then
@/lua/ge/extensions/core/groundMarkerArrows.lua
--simpleDebugText3d(string.format("Arrow %s: state=%s", id, proxy.state), proxy.pos)
else
for wpId, wpLog in pairs(lastWpLog) do
simpleDebugText3d(string.format("Wp %s: nodeToNodeAngle=%0.3f, %s, %s, links: %d, %0.1f", wpId, wpLog.nodeToNodeAngle or -1, wpLog.routeHasSmallestAngle and "smallest Angle" or "", wpLog.wp, wpLog.linkCount or -1, wpLog.distToVehicle or -1), wpLog.pos)
end
@/lua/ge/extensions/gameplay/markers/invisibleTrigger.lua
debugDrawer:drawLine(self.pos, data.vehPos, ColorF(0.91,0.05,0.48,0.5))
simpleDebugText3d(String(string.format("%0.2fm", data.vehPos:distance(self.pos))), (self.pos + data.vehPos)*0.5)
]]
@/lua/ge/extensions/gameplay/markers/driftLineMarker.lua
debugDrawer:drawLine(self.pos, data.vehPos, ColorF(0.91,0.05,0.48,0.5))
simpleDebugText3d(String(string.format("%0.2fm", data.vehPos:distance(self.pos))), (self.pos + data.vehPos)*0.5)
end