survivors: reducing jumpiness of homing projectiles re-directing by limiting it to a certain angle

adding rad degree conversion utils checking world border for projectiles
This commit is contained in:
Sheldan
2025-08-21 17:48:16 +02:00
parent c8767f1119
commit 71f48404c9
4 changed files with 61 additions and 4 deletions

View File

@@ -15,4 +15,12 @@ export function moveInDirectionOf(position: Vector, target: Vector, speedFactor:
export function straightMove(position: Vector, speed: Vector): Vector {
return position.add(speed)
}
export function toRad(angle) {
return angle / 180 * Math.PI;
}
export function toDegrees(angle) {
return angle * 180 / Math.PI
}