For this weeks assignment – our midterm – I built off the idea of what I created last week. I wanted to create an experience that would mimic a farm dog herding/leading its clan of chickens. Of course, during the process of creating this app, I ran into various challenges.
First, I had difficulty adjusting the constraint layouts of the buttons. On Xcode, I wanted the buttons to be laid out this way (shown below) to allow the user to have a larger screen space for the animals. But for some reason, I could not figure out how to get the constraints to be organized in the way shown on the screenshot below. I would change the constraints of each individual button, but it would always end up becoming even more messy and disorganized so I left it in the plane detect storyboard format that was created during class. This layout of buttons still worked though, as there was still enough space to see the animals. In the future, I will need to go back an adjust the constraints to allow for maximum screen space.
I also ran into a problem where I could not get the chickens to be added on as a child. After speaking to Nien, we figured out that the problem was because I set the default scale of the entities in Reality Composer as something very small, so that when I pressed “add a chick”, there was a chick being added but it was so small that you couldn’t see it by eye. I had originally set the scale small because in the past when I imported models into RC and put them into the AR app, the scale/size of the entity in real time was huge (as seen for my sheep in my previous week’s assignment). However, I realize now this is something you can and should alter through code via Xcode, not through RC scalability.
In addition, I tried to include the alteration of scalability of the entities that were added. I tried to write code that would create a relationship between the slider and the size of the chicks (so it would mimic if the chick added were a baby or an adult) but the slider didn’t end up working. I’m not sure if it were the code I wrote that had incorrect logic or if the relationship created on Xcode was faulty.
Here is the link to the screen recording!
In the future, it would have been fun to experiment with having the entities jiggle or wobble back and forth in real time to resemble “walking” when the user pressed on the “move to cursor” or “move right” buttons . I didn’t know if this were possible/would cause a crash because I knew you could trigger a notification that would cause an entity to jiggle through RC functions, but I didn’t know how to link up two actions – with one being on the Swift side and the other being on the RC side. When I tried writing the code for it and wiring it up, the build failed or just caused my screen to stay frozen.