| Blockland Forums > Modification Help |
| Finding Nearest Open Space from Projectile Collision |
| << < (2/2) |
| Greek2me:
If you get 3 bricks within that box, the other 3 would be open... |
| TripleNickels:
--- Quote from: Greek2me on April 06, 2011, 01:57:38 AM ---If you get 3 bricks within that box, the other 3 would be open... --- End quote --- No, lilboarder is right. You can only detect objects inside raycast searches, not ones that aren't there or where there is open space. Creating a matrix every search to decide where to put each brick would be incredibly inefficient. On topic: Let me grab your code and put in blockland and I'll see if I can help. |
| lilboarder32:
--- Quote from: TripleNickels on April 06, 2011, 01:59:22 AM ---No, lilboarder is right. You can only detect objects inside raycast searches, not ones that aren't there or where there is open space. Creating a matrix every search to decide where to put each brick would be incredibly inefficient. On topic: Let me grab your code and put in blockland and I'll see if I can help. --- End quote --- I updated a couple things, still going with my previous way as I'm not sure how to continue with Destiny's way. I get both half sizes of the bricks and push it away just enough from the brick. Still getting an overlap in some cases or random in other. |
| TripleNickels:
--- Quote from: lilboarder32 on April 06, 2011, 09:57:52 PM ---I updated a couple things, still going with my previous way as I'm not sure how to continue with Destiny's way. I get both half sizes of the bricks and push it away just enough from the brick. Still getting an overlap in some cases or random in other. --- End quote --- Is the overlap on the Z axis, X/Y axis, or does it vary? |
| lilboarder32:
--- Quote from: TripleNickels on April 06, 2011, 10:24:26 PM ---Is the overlap on the Z axis, X/Y axis, or does it vary? --- End quote --- I found a typo on the z-axis check, it works a ton better now. It's not 100% foolproof, but works fine enough for me. I'll revise op. |
| Navigation |
| Message Index |
| Previous page |