- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
Suppose I have some rect and inside it are various obstructions: trees, doodads, tiny unreachable crevices or shallow water (some of which are walkable). Thus some portion of the square rect is "unreachable."
The "reachable" area is the complement of the unreachable area and I would like to generate a random point which is inside this reachable area.
In this thread I was shown how to avoid choosing a point near a tree/destructable for some range X: http://www.hiveworkshop.com/forums/...8/pick-point-no-destructables-range-x-252803/
But that does not cover the general case of any "obstructables."
So how would I generalize this to the general case?
In this example, suppose I have correctly implemented this inviolable constraint when generating a random point.
i. NO-TREE: There can be no trees with range X of the random point.
Now I will add another, inviolable constraint that always must be satisfied.
ii. NO-DOODAD: There can be no doodads with range X of the random point.
As far as I can tell, while for trees we have
So how would this be done? Or would it be more prudent to simply make all doodads into destructables?
Suppose I have some rect and inside it are various obstructions: trees, doodads, tiny unreachable crevices or shallow water (some of which are walkable). Thus some portion of the square rect is "unreachable."
The "reachable" area is the complement of the unreachable area and I would like to generate a random point which is inside this reachable area.
In this thread I was shown how to avoid choosing a point near a tree/destructable for some range X: http://www.hiveworkshop.com/forums/...8/pick-point-no-destructables-range-x-252803/
But that does not cover the general case of any "obstructables."
So how would I generalize this to the general case?
In this example, suppose I have correctly implemented this inviolable constraint when generating a random point.
i. NO-TREE: There can be no trees with range X of the random point.
Now I will add another, inviolable constraint that always must be satisfied.
ii. NO-DOODAD: There can be no doodads with range X of the random point.
As far as I can tell, while for trees we have
EnumDestructablesInCircleBJ
, there is no equivalent for doodads. So how would this be done? Or would it be more prudent to simply make all doodads into destructables?