getFocus
Definition
-- @/lua/ge/extensions/gameplay/traffic.lua:136
local function getFocus() -- returns the focus point
if not focus then setFocus() end -- just in case
return focus
end
Callers
@/lua/ge/extensions/gameplay/traffic/vehicle.lua
self.isPlayerControlled = obj:isPlayerControlled()
self.focus = gameplay_traffic.getFocus()
self.focusDist = 0
self.speed = self.isPerson and self.vel:z0():length() or self.vel:length()
self.focus = gameplay_traffic.getFocus() -- the origin point, whether it's the game camera, player, or other entity
self.focusDist = self.pos:distance(self.focus.pos)
@/lua/ge/extensions/gameplay/parking.lua
end
focus = gameplay_traffic.getFocus()
aheadPos:set(focus.pos)