{"action":"closed","issue":{"url":"https://api.github.com/repos/wiremod/wire/issues/1197","repository_url":"https://api.github.com/repos/wiremod/wire","labels_url":"https://api.github.com/repos/wiremod/wire/issues/1197/labels{/name}","comments_url":"https://api.github.com/repos/wiremod/wire/issues/1197/comments","events_url":"https://api.github.com/repos/wiremod/wire/issues/1197/events","html_url":"https://github.com/wiremod/wire/issues/1197","id":168499305,"number":1197,"title":"E:nearestPoint(V) returns different vectors depending on whether or not the entity is \"solid\"","user":{"login":"Shadotak","id":7764570,"avatar_url":"https://avatars.githubusercontent.com/u/7764570?v=3","gravatar_id":"","url":"https://api.github.com/users/Shadotak","html_url":"https://github.com/Shadotak","followers_url":"https://api.github.com/users/Shadotak/followers","following_url":"https://api.github.com/users/Shadotak/following{/other_user}","gists_url":"https://api.github.com/users/Shadotak/gists{/gist_id}","starred_url":"https://api.github.com/users/Shadotak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shadotak/subscriptions","organizations_url":"https://api.github.com/users/Shadotak/orgs","repos_url":"https://api.github.com/users/Shadotak/repos","events_url":"https://api.github.com/users/Shadotak/events{/privacy}","received_events_url":"https://api.github.com/users/Shadotak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wiremod/wire/labels/Can't%20fix","name":"Can't fix","color":"ffffff"},{"url":"https://api.github.com/repos/wiremod/wire/labels/E2","name":"E2","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-31T03:24:54Z","updated_at":"2016-07-31T19:21:36Z","closed_at":"2016-07-31T19:21:36Z","body":"I made an automated door using E:nearestPoint(owner():pos()) and E:propNotSolid(1/0) that will open if the distance between the player and the nearest point of the prop to the player is less than a certain value. E:nearestPoint(V) returns different vectors for the prop depending on whether or not it's solid or not.\r\nThis E2 can demonstrate:\r\n```\r\n@name \r\n@outputs NearestPoint:vector\r\n@persist E:entity\r\nif(first()){\r\n    E = propSpawn(\"models/hunter/plates/plate1x2.mdl\",entity():pos() + vec(0,0,48),ang(0,0,90),1)\r\n    holoCreate(1)\r\n    runOnTick(1)\r\n}\r\n\r\nholoPos(1,E:nearestPoint(owner():pos()))\r\nNearestPoint = E:nearestPoint(owner():pos())\r\n\r\nif(E:nearestPoint(owner():pos()):distance(owner():pos()) < 50){\r\n    E:propNotSolid(1)\r\n}\r\nelse{\r\n    E:propNotSolid(0)\r\n}\r\n```\r\n\r\nThe hologram shows E:nearestPoint(owner():pos()). If you walk to the side of the prop, you can see how the prop flickers between solid (closed) and non-solid (open)."}}
{"actor":{"display_login":"AbigailBuccaneer"}}