{"action":"closed","issue":{"url":"https://api.github.com/repos/prime31/Nez/issues/65","repository_url":"https://api.github.com/repos/prime31/Nez","labels_url":"https://api.github.com/repos/prime31/Nez/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/prime31/Nez/issues/65/comments","events_url":"https://api.github.com/repos/prime31/Nez/issues/65/events","html_url":"https://github.com/prime31/Nez/issues/65","id":165885002,"number":65,"title":"boxcastBroadphase giving erroneous minimumTranslationVectors on slopes","user":{"login":"piedoom","id":8846211,"avatar_url":"https://avatars.githubusercontent.com/u/8846211?v=3","gravatar_id":"","url":"https://api.github.com/users/piedoom","html_url":"https://github.com/piedoom","followers_url":"https://api.github.com/users/piedoom/followers","following_url":"https://api.github.com/users/piedoom/following{/other_user}","gists_url":"https://api.github.com/users/piedoom/gists{/gist_id}","starred_url":"https://api.github.com/users/piedoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piedoom/subscriptions","organizations_url":"https://api.github.com/users/piedoom/orgs","repos_url":"https://api.github.com/users/piedoom/repos","events_url":"https://api.github.com/users/piedoom/events{/privacy}","received_events_url":"https://api.github.com/users/piedoom/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-07-15T21:54:18Z","updated_at":"2016-07-16T21:40:08Z","closed_at":"2016-07-16T21:40:08Z","body":"I have a basic character controller set up, and I'm importing some non-rectangular collision polygons from a tiled map.   \r\n\r\nWhen the player character moves, I have a boxcast set up to correct any intersections (like in the platformer example in Nez.Samples).\r\n\r\nHere's a sample of the code I'm working with -\r\n\r\n```\r\n......\r\n\r\nentity.colliders.unregisterAllCollidersWithPhysicsSystem();\r\n\r\n....\r\n\r\nforeach (var neighbor in neighbors)\r\n                {\r\n                    if (neighbor.isTrigger)\r\n                        continue;\r\n\r\n                    if (collider.collidesWith(neighbor, velocity, out collisionResult))\r\n                    {\r\n                            velocity -= collisionResult.minimumTranslationVector;\r\n                        }\r\n\r\n                        Debug.log($\"translationvector: {collisionResult.minimumTranslationVector.X}, {collisionResult.minimumTranslationVector.Y}\");\r\n                    }\r\n                }\r\n\r\n...\r\n\r\n```\r\n\r\nOn certain areas, this works correctly.  On flat ground, I might get a `log` output of `0, -0.4`, which makes sense as the player's gravity is pushing down at `0.4`.\r\n\r\nHowever, on slopes, I'm getting some erratic readings - the character jumps all around and I get output such as \r\n\r\n```\r\nLog: translationvector: 0, -31.58746\r\nLog: translationvector: 0, 0.4125366\r\nLog: translationvector: 0, -32.00002\r\nLog: translationvector: 0, 32.4158\r\nLog: translationvector: 0, -31.58228\r\nLog: translationvector: 0, 0.4177246\r\nLog: translationvector: 0, 32.41754\r\n```\r\n\r\nIt's worth noting that my player character has a size of 32px, so there may be a relation between the jumps in `Y` being ~32\r\n\r\nI've stripped everything off of my character besides the boxcast to make sure it was the issue, and it still remains unfortunately."}}
{"actor":{"display_login":"prime31"}}