pyro-dragon / Clan-PoC

The tech demo and basic functions of the Clan game
0 stars 0 forks source link

Validate building placement based on object collision #23

Closed pyro-dragon closed 10 years ago

pyro-dragon commented 10 years ago

Assert if a place is valid for building based on if the building collider is intersecting any other buildings or immovable features.

pyro-dragon commented 10 years ago

I have mostly done this now. It does require that the isTrigger bug is fixed. Also filtering the collision by layer would be amazing because then I can take out things like units and trees. EDIT: This is a question I asked relating to the isTrigger issue http://answers.unity3d.com/questions/654932/why-does-istrigger-true-not-work-without-an-update.html

pyro-dragon commented 10 years ago

This may be useful for making sure we are only checking the layers we need to http://docs.unity3d.com/Documentation/ScriptReference/Physics.IgnoreLayerCollision.html And this too http://answers.unity3d.com/questions/61737/how-to-use-ignore-layer-collisions.html

pyro-dragon commented 10 years ago

Almost complete. Now all I need to do is to disable and enable the footprint object when disabling and enabling the builder tool. OR Delete the footprint when disabled and create a new one when enabling. This is probably a more final solution.

pyro-dragon commented 10 years ago

This was done last week