Blockland Forums
Home
Help
Login
Register
Blockland Forums
»
Blockland Forums
»
Modification Help
»
SOLVED: Finding the brick that's closest to a player.
« previous
next »
Print
Pages: [
1
]
Author
Topic: SOLVED: Finding the brick that's closest to a player. (Read 732 times)
Axolotl2
January 05, 2013, 12:07:17 PM
I have a SimGroup that contains bricks. I want to find the brick that is closest to a player.
«
Last Edit: January 05, 2013, 02:05:52 PM by Axolotl2
»
Ad Bot
Advertisement
Port
January 05, 2013, 12:10:17 PM
Step through every brick in the group. In each iteration, find the distance to the player and keep track of the lowest distance encountered as well as which brick had that distance. When you're done, the rest is up to you.
Destiny/Zack0Wack0
January 05, 2013, 07:34:25 PM
If there's going to be a lot, you might break it up into many SimGroups in a grid to optimize it.
Print
Pages: [
1
]
« previous
next »
Blockland Forums
»
Blockland Forums
»
Modification Help
»
SOLVED: Finding the brick that's closest to a player.