Fix some issues

This commit is contained in:
schmelczerandras 2020-11-03 23:40:14 +01:00
parent c0a588fb73
commit 1ce961d6c2
27 changed files with 432 additions and 200 deletions

View file

@ -17,7 +17,12 @@ export const moveCircle = (
tangent?: vec2;
hitObject?: GameObject;
} => {
const direction = vec2.normalize(vec2.create(), delta);
const direction = vec2.clone(delta);
if (vec2.length(delta) > 0) {
vec2.normalize(direction, direction);
}
const deltaLength = vec2.length(delta);
let travelled = 0;
let rayEnd = vec2.create();