{"action":"closed","issue":{"url":"https://api.github.com/repos/jMonkeyEngine/jmonkeyengine/issues/744","repository_url":"https://api.github.com/repos/jMonkeyEngine/jmonkeyengine","labels_url":"https://api.github.com/repos/jMonkeyEngine/jmonkeyengine/issues/744/labels{/name}","comments_url":"https://api.github.com/repos/jMonkeyEngine/jmonkeyengine/issues/744/comments","events_url":"https://api.github.com/repos/jMonkeyEngine/jmonkeyengine/issues/744/events","html_url":"https://github.com/jMonkeyEngine/jmonkeyengine/issues/744","id":259852173,"number":744,"title":"Geometry.collideWith() is incompatible with ignoreTransform geometries","user":{"login":"stephengold","id":2287609,"avatar_url":"https://avatars1.githubusercontent.com/u/2287609?v=4","gravatar_id":"","url":"https://api.github.com/users/stephengold","html_url":"https://github.com/stephengold","followers_url":"https://api.github.com/users/stephengold/followers","following_url":"https://api.github.com/users/stephengold/following{/other_user}","gists_url":"https://api.github.com/users/stephengold/gists{/gist_id}","starred_url":"https://api.github.com/users/stephengold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephengold/subscriptions","organizations_url":"https://api.github.com/users/stephengold/orgs","repos_url":"https://api.github.com/users/stephengold/repos","events_url":"https://api.github.com/users/stephengold/events{/privacy}","received_events_url":"https://api.github.com/users/stephengold/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"stephengold","id":2287609,"avatar_url":"https://avatars1.githubusercontent.com/u/2287609?v=4","gravatar_id":"","url":"https://api.github.com/users/stephengold","html_url":"https://github.com/stephengold","followers_url":"https://api.github.com/users/stephengold/followers","following_url":"https://api.github.com/users/stephengold/following{/other_user}","gists_url":"https://api.github.com/users/stephengold/gists{/gist_id}","starred_url":"https://api.github.com/users/stephengold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephengold/subscriptions","organizations_url":"https://api.github.com/users/stephengold/orgs","repos_url":"https://api.github.com/users/stephengold/repos","events_url":"https://api.github.com/users/stephengold/events{/privacy}","received_events_url":"https://api.github.com/users/stephengold/received_events","type":"User","site_admin":false},"assignees":[{"login":"stephengold","id":2287609,"avatar_url":"https://avatars1.githubusercontent.com/u/2287609?v=4","gravatar_id":"","url":"https://api.github.com/users/stephengold","html_url":"https://github.com/stephengold","followers_url":"https://api.github.com/users/stephengold/followers","following_url":"https://api.github.com/users/stephengold/following{/other_user}","gists_url":"https://api.github.com/users/stephengold/gists{/gist_id}","starred_url":"https://api.github.com/users/stephengold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephengold/subscriptions","organizations_url":"https://api.github.com/users/stephengold/orgs","repos_url":"https://api.github.com/users/stephengold/repos","events_url":"https://api.github.com/users/stephengold/events{/privacy}","received_events_url":"https://api.github.com/users/stephengold/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-09-22T15:27:45Z","updated_at":"2017-09-22T18:02:09Z","closed_at":"2017-09-22T18:02:08Z","author_association":"CONTRIBUTOR","body":"When a Geometry has ignoreTransform=true, the mesh-collision code fails to take this into account, which can cause Geometry.collideWith() to return incorrect results.\r\n\r\nIn the test case below, zero collisions are detected where there should be 4 collisions with the red box. (To verify this, comment out the setLocalTranslation() and setIgnoreTransform() calls.)\r\n\r\n    package mygame;\r\n\r\n    import com.jme3.app.SimpleApplication;\r\n    import com.jme3.collision.CollisionResults;\r\n    import com.jme3.material.Material;\r\n    import com.jme3.math.Ray;\r\n    import com.jme3.math.Vector3f;\r\n    import com.jme3.scene.Geometry;\r\n    import com.jme3.scene.shape.Box;\r\n\r\n    public class Main extends SimpleApplication {\r\n\r\n    public static void main(String[] args) {\r\n        Main app = new Main();\r\n        app.start();\r\n    }\r\n\r\n    @Override\r\n    public void simpleInitApp() {\r\n        Geometry geom = new Geometry(\"Box\", new Box(1, 1, 1));\r\n        Material m = assetManager.loadMaterial(\"Common/Materials/RedColor.j3m\");\r\n        geom.setMaterial(m);\r\n\r\n        geom.setLocalTranslation(0f, 3f, 0f);\r\n        geom.setIgnoreTransform(true);\r\n\r\n        rootNode.attachChild(geom);\r\n        rootNode.updateLogicalState(0.1f);\r\n        rootNode.updateGeometricState();\r\n\r\n        Ray ray = new Ray(/* origin */new Vector3f(0f, 0f, 10f),\r\n                /* direction */ new Vector3f(0f, 0f, -1f));\r\n        CollisionResults results = new CollisionResults();\r\n        rootNode.collideWith(ray, results);\r\n\r\n        System.out.printf(\"number of collisions = %d%n\", results.size());\r\n        System.exit(0);\r\n    }\r\n    }"}}
{"actor":{"display_login":"stephengold"}}