We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d86e23 commit 1c269a1Copy full SHA for 1c269a1
src/util.ts
@@ -98,7 +98,7 @@ export const getRandomPosition = (entity: ObjectEntity): VectorAbstract => {
98
pos.x += xOffset;
99
pos.y += yOffset;
100
} else { // Circular hitbox
101
- const radius = Math.random() * entity.physicsData.values.size;
+ const radius = Math.sqrt(Math.random()) * entity.physicsData.values.size;
102
const angle = Math.random() * PI2;
103
104
pos.x += Math.cos(angle) * radius;
0 commit comments