Elongate goos for the pipe.
This commit is contained in:
parent
d8296940e5
commit
4dab1ac7d5
|
|
@ -844,9 +844,9 @@ export default class GooTowerGame extends Phaser.Scene {
|
||||||
const pdx = pipe.x - x;
|
const pdx = pipe.x - x;
|
||||||
const pdy = pipe.y - y;
|
const pdy = pipe.y - y;
|
||||||
const pdist = Math.hypot(pdx, pdy);
|
const pdist = Math.hypot(pdx, pdy);
|
||||||
const PULL_RANGE = b.r * 7;
|
const PULL_RANGE = b.r * 16;
|
||||||
if (pdist < PULL_RANGE) {
|
if (pdist < PULL_RANGE) {
|
||||||
const pullAmt = Math.pow(1 - pdist / PULL_RANGE, 1.6);
|
const pullAmt = Math.pow(1 - pdist / PULL_RANGE, 1.3);
|
||||||
const inv = pdist > 0.001 ? 1 / pdist : 0;
|
const inv = pdist > 0.001 ? 1 / pdist : 0;
|
||||||
const pullX = pdx * inv;
|
const pullX = pdx * inv;
|
||||||
const pullY = pdy * inv;
|
const pullY = pdy * inv;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue