Things I did today:
- Downloaded a bunch of free plant prefabs and decided that the cacti would be best for testing
- Created an empty FlowerHolder GameObject and attached 20 cacti (6 different models randomly duplicated and distributed)
- Created some variables that I’ll need in order to move flowers, such as the garden X, Y, and Z min and max positions, the maximum number of flowers that can be moved, and arrays of flower X and Z positions (which will be used to make sure flowers don’t overlap)
- Created the MoveFlowers(int numberOfFlowers) method. This will be called from FlowerGained() and will be in charge of moving flowers to the garden. The parameter is the number of flowers to move.
- Had trouble getting cacti to move when the user completed a position. As it stands, some piece of the cactus is moving (maybe its transform?), but you can’t see it if you don’t have the cactus selected before you run the scene. Maybe this is because each cactus is a prefab? Not sure yet. Moving works perfectly if you use a simple cube.
- Next time, I’ll try to fix this issue and maybe get some flowers, rather than cacti