Created
October 21, 2022 13:23
-
-
Save wizard1066/09f97a36bbf73554a9026834bd52829e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while (intersects(point: newPosition, center: result!.position, radius: 0.5)) { | |
| if view.pointOfView!.worldPosition.x > 3.5 { | |
| result!.position.x += 1 | |
| } | |
| if view.pointOfView!.worldPosition.x < -3.5 { | |
| result!.position.x -= 1 | |
| } | |
| if view.pointOfView!.worldPosition.y > 3.5 { | |
| result!.position.y += 1 | |
| } | |
| if view.pointOfView!.worldPosition.y < -3.5 { | |
| result!.position.y -= 1 | |
| } | |
| if view.pointOfView!.worldPosition.z > 3.5 { | |
| result!.position.z += 1 | |
| } | |
| if view.pointOfView!.worldPosition.z < -3.5 { | |
| result!.position.z -= 1 | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment