Improve movement

This commit is contained in:
schmelczerandras 2020-10-07 21:05:24 +02:00
parent e01400058d
commit 9e35538b79
13 changed files with 164 additions and 125 deletions

View file

@ -98,15 +98,11 @@ export class BlobShape extends Drawable {
}
public minDistance(target: vec2): number {
// todo
return 0;
/*return (
Math.min(
this.head.distance(target),
this.leftFoot.distance(target),
this.rightFoot.distance(target)
) / 2
);*/
return Math.min(
this.head.distance(target),
this.leftFoot.distance(target),
this.rightFoot.distance(target),
);
}
protected getObjectToSerialize(transform2d: mat2d, transform1d: number): any {