Okay, so I’ve previously made a post on here about drawing a polygon in java, specifically a hexagon and it works just fine. However I just need to tweak it ever so slightly, just to ensure that my point of origin is correct or rather, to check for collisions around the edges of y shape.

```
int numberOfSides = 6;
for (int i = 0; i < numberOfSides; i++){
h.addPoint((int) (xPos + side *
Math.sin(i * 2 * Math.PI / numberOfSides)),
(int) (yPos + side * Math.cos(i * 2 * Math.PI / numberOfSides)));
}
```

Only problem I have is that during collision with other shapes or the edge of my JFrame is that it doesn’t detect the edges correctly, the upper half and left half are not detected, however the bottom half and the right half is, any ideas as to where I’m going wrong? Is it just some silly error I’m making with my maths? - I’m not gonna lie, I’m not an expert when it comes to maths, however, I can’t edit it **too** much, I just need to edit the way in which my shape is adding the points, so that it’s adding each point correctly, and each point is considered a location of which can collide, and bounce from other objects.