Last active
December 6, 2021 01:05
-
-
Save mrowrpurr/166b8c2dc30152d0ccb0c180f8b56a3a 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
| Actor player = Game.GetPlayer() | |
| float direction | |
| if player.GetAngleZ() > 180 | |
| direction = player.GetAngleZ() - 180 | |
| else | |
| direction = player.GetAngleZ() + 180 | |
| endIf | |
| float xOffset = (distanceFromTarget) * -Math.cos(player.GetAngleZ()); | |
| float yOffset = (distanceFromTarget) * -Math.sin(player.GetAngleZ()) | |
| dummyActor.MoveTo(target, afXOffset = yOffset, afYOffset = xOffset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment