{"action":"opened","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/21028","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/21028/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/21028/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/21028/events","html_url":"https://github.com/godotengine/godot/issues/21028","id":350674761,"node_id":"MDU6SXNzdWUzNTA2NzQ3NjE=","number":21028,"title":"Function body_shape_entered use of the body_shape to get node of the colliding shape","user":{"login":"maxime4000","id":4070713,"node_id":"MDQ6VXNlcjQwNzA3MTM=","avatar_url":"https://avatars3.githubusercontent.com/u/4070713?v=4","gravatar_id":"","url":"https://api.github.com/users/maxime4000","html_url":"https://github.com/maxime4000","followers_url":"https://api.github.com/users/maxime4000/followers","following_url":"https://api.github.com/users/maxime4000/following{/other_user}","gists_url":"https://api.github.com/users/maxime4000/gists{/gist_id}","starred_url":"https://api.github.com/users/maxime4000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxime4000/subscriptions","organizations_url":"https://api.github.com/users/maxime4000/orgs","repos_url":"https://api.github.com/users/maxime4000/repos","events_url":"https://api.github.com/users/maxime4000/events{/privacy}","received_events_url":"https://api.github.com/users/maxime4000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-15T03:36:46Z","updated_at":"2018-08-15T03:36:46Z","closed_at":null,"author_association":"NONE","body":"<!-- Please search existing issues for potential duplicates before filing yours:\r\nhttps://github.com/godotengine/godot/issues?q=is%3Aissue\r\n-->\r\n\r\n**Godot version: 3.0.6**\r\n<!-- Specify commit hash if non-official. -->\r\n\r\n\r\n**OS/device including version: Windows 10**\r\n<!-- Specify GPU model and drivers if graphics-related. -->\r\n\r\n\r\n**Issue description:**\r\nI want to acheived that bullet can pass some of my collision define by a group. I use body_shape_entered(body_id, body, body_shape, area_shape) to know which collisionShape I touch to know if the bullet need to be kill or not. While it's easier with some hack with the CollisionShape2D, when trying to work with CollisionPolygon2D, it's awful. \r\n\r\nI think the body (which is one of those : StaticBody2D, RigidBody2D, Area2D or KinematicBody2D) should have a member function that is: Node getCollisionNode(int body_shape) which return the node that have been hit in the collision process. That way, I could use body_shape without having to think that maybe the node returned could be null... Even that I not really sure what is suppose to be use has there is no example of body_shape being use... CollisionPolygon2D seem doing optimization in the background for better collision detection and this is why it's annoying and also why I didn't try to reply my answer in the reddit post.\r\n\r\nContext : https://www.reddit.com/r/godot/comments/97cy41/area2d_detect_which_collision_shape_it_hit/\r\n\r\n\r\n**Steps to reproduce:**\r\nSee reddit post\r\n\r\n**Minimal reproduction project:**\r\nDon't have one, but if it's really need, I will create one later. Just ask me to do it\r\n<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->"}}
{"actor":{"display_login":"maxime4000"}}