View Single Post
Posts: n/a
Default 02-27-2010, 12:06 AM

Originally Posted by zonedabone View Post
Guess what? I added a method to the world. Every second, it runs what I call a "Maintenance script." It resets the vertical position of your cylinder! I can also add other things to it. I have it reset the positions of the others at the beginning, since they never move. Just remember that you can have as many of these as you want! I'm thinking of adding a side script that reduces the load on the main unit, though. I wouldn't be good to have 100 cylinders if 90 of them are obviously out of reach! Maybe this could be included in the maintenance script!
I might have an idea on how this could be achieved. Have the method find every object that is within a reasonable distance put into a "listen for" list at the beginning. Then after the maintenance script is run, it will iterate through the "listen for" list to remove objects out of range and add the objects within range (that is, if they are in the main list and not already in the "listen for" list to begin with). Then, have the collision detector use the "listen for" list instead of the main list.
Reply With Quote