fixed a bug where wires won't pop up as the camera moves

This commit is contained in:
minjaesong
2021-12-28 15:28:45 +09:00
parent 9810d0927c
commit c9b87492c2
6 changed files with 42 additions and 29 deletions

View File

@@ -288,6 +288,12 @@ class Vector2 {
this.y = y
}
fun setPolar(magnitude: Double, direction: Double) {
this.x = Math.cos(direction) * magnitude
this.y = Math.sin(direction) * magnitude
}
/**
* Returns the x component of this [Vector2].
* @return [Vector2]