mirror of
https://github.com/Sheldan/canvas.git
synced 2026-04-14 19:56:28 +00:00
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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user