Hi all, I’m trying to use ents.FindInCone to project a view-cone for a homing missile. Instead of returning all entities within the cone, it seems to return all entities in a 180 degree arc forward of the cone position.
For example, this code:
local missilePos = missile:GetPos() local missileForward = missile:GetForward() local found = ents.FindInCone(missilePos, missileForward, 3000, 30) for k, ent in pairs(found) do debugoverlay.Line( missilePos, ent:GetPos(), 15, Color(0, 0, 255), true ) end
produces these lines:
I’ve tried with different angles. I’ve also tried converting to radians just in case it was that, same result every time.
I can post-process the list with dot product for now, but I’m not sure why this is happening!